- show TempCtrl:Soll in GUI

This commit is contained in:
jens
2020-12-01 19:51:46 +01:00
parent 19ed110d0b
commit 806259963c
2 changed files with 7 additions and 5 deletions
+5 -2
View File
@@ -137,21 +137,24 @@ class TcTask(ATask):
self.msg_handler = msg_handler
msg_handler.set_recv_handler(self.recv)
self.tc = tc
self.temp_soll = 30
async def recv(self, data):
print(data)
for pair in data.items():
if 'Soll' in pair[0]:
self.tc.set_theta_soll(pair[1])
self.temp_soll = pair[1]
async def send(self, data):
await self.msg_handler.send(data)
async def on_process(self):
print("{}: Started with interval {} s".format(self.msg_handler.get_key(), self.interval))
self.tc.set_theta_soll(30)
while True:
self.tc.set_theta_soll(self.temp_soll)
await self.send({'Soll': self.temp_soll})
self.tc.process()
await asyncio.sleep(self.interval)