Skip to content
Snippets Groups Projects
Commit 214fd9b2 authored by Robert Hartung's avatar Robert Hartung
Browse files

fixes a bug, where an exception occurs when current is not read correctly

parent bc024b60
No related branches found
No related tags found
No related merge requests found
......@@ -382,8 +382,8 @@ class ChamberController(Module):
#time.sleep(0.1)
#self.actual_current =
current = protocol.get_actual_current()
# TODO(rh): Test this!
self.mqtt_client.publish(self.mqtt_topic_prefix+"current", pack("d", current), qos=2)
if current is not None:
self.mqtt_client.publish(self.mqtt_topic_prefix+"current", pack("d", current), qos=2)
# self.publish()
# logger.log("delta={:05.2f} delta_ambient={:05.2f} delta_current={:05.2f} voltage={:05.2f} v_out={:05.2f} v_actual={:05.2f} i_actual={:05.2f} pid_sum={:05.2f}".format(delta, delta_ambient, delta_current, self.voltage, v_out, self.actual_voltage, self.actual_current, self.pid.sum))
except AssertionError as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment