From: NeilBrown Date: Sat, 29 Dec 2012 20:52:02 +0000 (+1100) Subject: gsmd: fix the force_state command. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=57c1fae1e5c76e1890e57e4e980c7897db4be0ea;p=plato.git gsmd: fix the force_state command. It didn't reset 'lastrun', so it didn't really work. --- diff --git a/gsm/gsmd.py b/gsm/gsmd.py index 06e1a0d..893d6ce 100644 --- a/gsm/gsmd.py +++ b/gsm/gsmd.py @@ -439,6 +439,7 @@ control['flight'] = [ control['reset'] = [ # turning power off just kills everything!!! + AtAction(at='_ORESET', critical = False), PowerAction('reopen'), #PowerAction('off'), AtAction(at='E0', timeout=30000), @@ -749,6 +750,8 @@ class GsmD(AtChannel): log("Force state to", state); self.cancel_timeout() self.nextstate = [] + n = len(control[state]) + self.lastrun = n * [0] self.gstate = state def advance(self):