diff --git a/fetapd.py b/fetapd.py index 1f7740f..2cc54d4 100644 --- a/fetapd.py +++ b/fetapd.py @@ -75,6 +75,7 @@ if __name__ == '__main__': feap = FeApUserInterface(cfg.pinconfig) controller = statemachine.StateMachineController(phone, feap, cfg.dialconfig) webinterface = FeTapWeb({}, controller) + controller.publish_state = webinterface.publish_status # TODO: Use real events from daemon controller.queue_event('registration_in_progress') diff --git a/statemachine.py b/statemachine.py index 9e30a25..dd0fab5 100644 --- a/statemachine.py +++ b/statemachine.py @@ -307,6 +307,10 @@ class StateMachineController(object): oldstate = self.state.__class__ print('%s -> %s' % (oldstate.__name__, newstate.__name__)) self.state = newstate(self) + self.publish_state() + + def publish_state(self): + pass def queue_event(self, evname, *evargs, **evkwargs): if not hasattr(AbstractState, 'on_%s' % (evname)):