Show ambient temperature and warp factor in the GUI's status bar
Adds a 'System' channel for static, global info that doesn't belong to any one task - sent once at startup directly from brewpi.py's __main__ (a client connecting later still gets it via the dispatcher's global_state replay on subscribe, same mechanism SudTask's startup Name/Description already relies on). Moves warp_factor out of SudTask's startup message and into this new channel, since it's not actually Sud-specific - it's now available (and the status bar shows it) even without a Sud configured. The forecast plot's progress-line scaling switches to the same general Window.warp_factor field. Displayed via a permanent status bar widget (not cleared by the existing transient step/schedule showMessage() calls).
This commit is contained in:
+1
-6
@@ -24,7 +24,6 @@ class SudTask(ATask):
|
||||
# its own, so hold_remaining must be ticked by dt explicitly to get
|
||||
# the same speedup instead of running in real time.
|
||||
self.dt = dt
|
||||
self.warp_factor = dt / interval
|
||||
self.msg_handler = msg_handler
|
||||
msg_handler.set_recv_handler(self.recv)
|
||||
|
||||
@@ -112,11 +111,7 @@ class SudTask(ATask):
|
||||
self.sud.set_on_changed('user_message', self.on_user_message_changed)
|
||||
self.sud.set_on_changed('hold_remaining', ChangedFloat(self.on_hold_remaining_changed, prec=0).set)
|
||||
|
||||
asyncio.create_task(self.send({
|
||||
'Name': self.sud.name,
|
||||
'Description': self.sud.description,
|
||||
'WarpFactor': self.warp_factor,
|
||||
}))
|
||||
asyncio.create_task(self.send({'Name': self.sud.name, 'Description': self.sud.description}))
|
||||
|
||||
while True:
|
||||
if self.sud.state == SudState.RAMPING:
|
||||
|
||||
Reference in New Issue
Block a user