buzz twice to give users more time
[saartuer.git] / statemachine.py
index 645737c649f33a1745013de31d3cbfb5c363e1d8..a5e52f69b9bbe522ef839a3f98b23158116ad25a 100644 (file)
@@ -12,7 +12,7 @@ def play_sound (what):
                return
        soundfile = SOUNDS_DIRECTORY + what + '/' + random.choice(soundfiles)
        hour = datetime.datetime.time(datetime.datetime.now()).hour
-       volume = 60 if hour >= 22 or hour <= 6 else 95
+       volume = 60 if hour >= 22 or hour <= 6 else 90
        fire_and_forget_cmd ([SOUNDS_PLAYER, "-volume", str(volume), soundfile], "StateMachine: ")
 
 # convert an absolute nervlist to a relative one
@@ -95,6 +95,8 @@ class StateMachine():
                def handle_pins_event(self):
                        pass # one needn't implement this
                def handle_buzz_event(self,arg): # this shouldn't be overwritten
+                       # Buzz twice to give users more time to run ;-)
+                       self.actor().act(Actor.CMD_BUZZ)
                        self.actor().act(Actor.CMD_BUZZ)
                        arg("200 okay: buzz executed")
                def handle_cmd_unlock_event(self,arg):