From 57c1fae1e5c76e1890e57e4e980c7897db4be0ea Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 30 Dec 2012 07:52:02 +1100 Subject: [PATCH] gsmd: fix the force_state command. It didn't reset 'lastrun', so it didn't really work. --- gsm/gsmd.py | 3 +++ 1 file changed, 3 insertions(+) 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): -- 2.39.5