- always create pot

This commit is contained in:
jens
2020-12-17 21:42:22 +01:00
parent 556aade142
commit 722395c049
+3 -4
View File
@@ -26,10 +26,9 @@ if __name__ == '__main__':
# Plant # Plant
pot_params = config['Plant'] pot_params = config['Plant']
pot = Pot(pot_params, 20) pot = Pot(pot_params, 20)
if "sim" in config['Controller']['plant_name']: if "sim" in config['Controller']['sensor_name']:
if "sim" in config['Controller']['sensor_name']: pot.set_on_changed("temp", ChangedFloat(sensor.set_fake_temp, prec=3).set)
pot.set_on_changed("temp", ChangedFloat(sensor.set_fake_temp, prec=3).set) taskmgr.add(PotTask(pot, DT_CTRL, dispatcher.msgio_get("Pot")))
taskmgr.add(PotTask(pot, DT_CTRL, dispatcher.msgio_get("Pot")))
# Heater # Heater
heater = HeaterFactory.create(config['Controller']['heater_name'], config['Heater']) heater = HeaterFactory.create(config['Controller']['heater_name'], config['Heater'])