public void fireBalloon(int balloon) {
switch (balloon) {
case 1: {
if(hasBalloon1) {
getActuator("Balloon1").enqueueCommand(
new Command(GRTGPIORelay.RELAY_FORWARD, BALLOON_TIME));
getActuator("Balloon1").enqueueCommand(
new Command(GRTGPIORelay.RELAY_OFF));
hasBalloon1 = false;
}
break;
}
case 2: {
if(hasBalloon2) {
getActuator("Balloon1").enqueueCommand(
new Command(GRTGPIORelay.RELAY_REVERSE, BALLOON_TIME));
getActuator("Balloon1").enqueueCommand(
new Command(GRTGPIORelay.RELAY_OFF));
hasBalloon2 = false;
}
break;
}
case 3: {
if(hasBalloon3) {
getActuator("Balloon2").enqueueCommand(
new Command(GRTGPIORelay.RELAY_FORWARD, BALLOON_TIME));
getActuator("Balloon2").enqueueCommand(
new Command(GRTGPIORelay.RELAY_OFF));
hasBalloon3 = false;
}
break;
}
case 4: {
if(hasBalloon4) {
getActuator("Balloon2").enqueueCommand(
new Command(GRTGPIORelay.RELAY_FORWARD, BALLOON_TIME));
getActuator("Balloon2").enqueueCommand(
new Command(GRTGPIORelay.RELAY_OFF));
hasBalloon4 = false;
}
break;
}
}