Mirror raw sensor temp through when the controller isn't configured yet
is_configured() (Smith's model plant params, only ever set once a Sud loads) gates TcTask's call to tc.process() - the only place theta_ist/ heatrate_ist/heatrate_soll get updated and broadcast. Right after server start, before any Sud has ever loaded, that left them frozen at their __init__ defaults forever, so the GUI's Ist Temp/Rate and Soll Rate displays never showed anything on connect. Mirror the raw sensor reading through instead, with rates at 0 since there's no controller output yet.
This commit is contained in:
@@ -78,5 +78,19 @@ class TcTask(ATask):
|
||||
# would otherwise raise.
|
||||
if self.tc.is_configured():
|
||||
self.tc.process()
|
||||
else:
|
||||
# Smith's model plant params only ever arrive from a Sud's
|
||||
# doc (see brewpi.py), so right after server start - before
|
||||
# any Sud has ever loaded - is_configured() stays False and
|
||||
# process() never runs. Without this, theta_ist/
|
||||
# heatrate_ist/heatrate_soll (and thus the 'Ist'/'Soll'
|
||||
# messages below) would stay frozen at their __init__
|
||||
# defaults forever, leaving the GUI's Ist Temp/Rate and
|
||||
# Soll Rate displays blank on connect. Mirror the raw
|
||||
# sensor reading straight through instead - there's no
|
||||
# controller output yet to report a real rate for.
|
||||
self.tc.theta_ist = self.tc.get_theta_ist_set()
|
||||
self.tc.heatrate_ist = 0.0
|
||||
self.tc.heatrate_soll = 0.0
|
||||
await asyncio.sleep(self.interval)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user