From 59becb08c4414836cf0f956996e7244aea3d3f27 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 17 Feb 2014 06:16:14 +0100 Subject: add panicgate variable (will be set via cmdline args) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/__main__.py b/src/__main__.py index f327614..0297967 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -22,7 +22,7 @@ import datetime ## Set global variables -global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result, reset +global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result, reset, panicgate global periodically, wait_period, fadein_time, fadeout_time, fadein_steps, fadeout_steps global monitor_controller, running, continuous_run, panic global signal_SIGTERM @@ -102,6 +102,11 @@ fadeout_steps = 40 :int The number of steps in the fade out phase, if any ''' +panicgate = False +''' +:bool `True` if translition into initial state should be skipped +''' + running = True ''' :bool `True` while to program has not received a terminate signal @@ -157,7 +162,7 @@ def continuous_run(): ## Fade in early_exit = False ftime = 0 - if fadein_time is not None: + if (fadein_time is not None) and not panicgate: dtime = fadein_time / fadein_steps df = 1 / fadein_steps while running: -- cgit v1.2.3-70-g09d2