From 129b74377b45563ed5b29b6108068930c0f935bc Mon Sep 17 00:00:00 2001 From: tkl Date: Tue, 3 Jan 2017 21:04:26 +0100 Subject: [PATCH] error handler reworked --- src/gate/gate_state.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gate/gate_state.py b/src/gate/gate_state.py index ba0d6a7..96b9f33 100644 --- a/src/gate/gate_state.py +++ b/src/gate/gate_state.py @@ -32,7 +32,7 @@ POWER_SENSOR_I2C_ADDRESS = 0x40 POWER_CONSECUTIVE_READS = 1000 MAX_ENGINE_POWER = {"up":310, "down":290} -MAX_GATE_RUNTIME = {"open":300, "close":250} +MAX_GATE_RUNTIME = {"open":300, "close":300} class GateState(object): @@ -166,10 +166,4 @@ class GateState(object): self.__gate_handler.stop() self.__comserver.transmit(MQTT_TOPIC, str(time()) + \ " Error handler!!!") - if self.__error_count >= 5: self.__update_state(STATE_INIT) - self.__error_count += 1 - else: - self.__comserver.transmit(MQTT_TOPIC, str(time()) + \ - "Error Handler - couldn't reinitiate " + \ - "system. Bye bye...")