added relay to suppress light barrier and third circle contact when not needed

This commit is contained in:
Lucas Pleß 2012-06-08 03:47:59 +02:00
parent 8819f79f3c
commit 4fbf9f91fc
1 changed files with 11 additions and 1 deletions

View File

@ -34,7 +34,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
machine.reset();
relaisboard.open();
relaisboard.toggleRelais(2, 2000);
resetDomotics();
}
private void rate(int rating, String text) {
@ -58,6 +58,8 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
case IDLE:
gamerRating = 3;
machine.stopTimer();
resetDomotics();
guiControl.setExtra("");
guiControl.setWall("");
@ -70,6 +72,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
guiControl.showCountDown(false);
break;
case ENTERED_ROOM:
relaisboard.setRelais(7, false); // disable light barrier over relais
mpdController.setVolume(70);
mpdController.playSong("tidirium", "welcome");
@ -82,6 +85,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
machine.startTimer(60*8);
break;
case TABLE_GAME_ONE:
relaisboard.setRelais(6, true); // enable third green circle
guiControl.setWall("64K RAM SYSTEM 38911 BASIC BYTES FREE. **** COMMODORE 64 BASIC V2 ****");
mpdController.setVolume(70);
@ -148,6 +152,7 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
sayScore();
relaisboard.setRelais(6, false); // disable third green circle
relaisboard.blinkRelais(2, 700, 6); // hint Button
break;
@ -383,5 +388,10 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent
}
private void resetDomotics() {
relaisboard.toggleRelais(2, 2000);
relaisboard.setRelais(7, true); // enable light barrier over relais
relaisboard.setRelais(6, true); // enable third green circle
}
}