From: Ralf Jung Date: Mon, 14 Oct 2013 17:22:28 +0000 (+0200) Subject: Merge branch 'master' of ralfj.de:saartuer X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/6f24ccffd4dc1b8401cddad047296a0c11fedb5f?hp=a05dfd226f0b41c040a0b7e5cd61be1f22db81a2 Merge branch 'master' of ralfj.de:saartuer --- diff --git a/statemachine.py b/statemachine.py index f2cac47..332f48d 100644 --- a/statemachine.py +++ b/statemachine.py @@ -1,4 +1,4 @@ -from libtuer import ThreadFunction, logger, fire_and_forget +8from libtuer import ThreadFunction, logger, fire_and_forget from actor import Actor import os, random @@ -23,9 +23,9 @@ CLOSE_REPEAT_TIMEOUT = 8 CLOSE_REPEAT_NUMBER = 3 # StateAboutToOpen constants -ABOUTOPEN_NERVLIST = [(5, lambda : play_sound("flipswitch")), (10, lambda:play_sound("flipswitch")), (10, lambda:Logger.warning("Space open but switch not flipped for 10 seconds")),\ - (20, lambda:play_sound("flipswitch")), (30, lambda:play_sound("flipswitch")), (30, lambda:Logger.error("Space open but switch not flipped for 30 seconds")),\ - (40, lambda:play_sound("flipswitch")), (50, lambda:play_sound("flipswitch")), (56, lambda:play_sound("flipswitch")), (60, lambda:Logger.critical("Space open but switch not flipped for 60 seconds"))] +ABOUTOPEN_NERVLIST = [(5, lambda : play_sound("flipswitch")), (5, lambda:play_sound("flipswitch")), (0, lambda:Logger.warning("Space open but switch not flipped for 10 seconds")),\ + (10, lambda:play_sound("flipswitch")), (10, lambda:play_sound("flipswitch")), (0, lambda:Logger.error("Space open but switch not flipped for 30 seconds")),\ + (10, lambda:play_sound("flipswitch")), (10, lambda:play_sound("flipswitch")), (6, lambda:play_sound("flipswitch")), (4, lambda:Logger.critical("Space open but switch not flipped for 60 seconds"))] # StateAuf constants # time that must pass between two bell_ringing events to buzz the door again (seconds)