From: Constantin Berhard Date: Mon, 14 Oct 2013 17:21:57 +0000 (+0200) Subject: nervliste relativ X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/1d2c4ad07d11935c8047105eec82430f86049a7c?hp=--cc nervliste relativ --- 1d2c4ad07d11935c8047105eec82430f86049a7c diff --git a/statemachine.py b/statemachine.py index 6a3e889..8f1c2fa 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)