Remove the ad-hoc cooling override now that COOL handles it natively
TempControllerBase.cooling/set_cooling() forced y=0 in advance of a
Sud ramp-down step; redundant now that the FSM's own COOL state
detects and handles a negative diff itself. Removed from the
controller, SudTask's anticipatory detection (and the Step message's
now-unused "Cooling" field), and demo_sud.py's mirror of it.
gui: the "Cool down" status-bar indicator now reflects the
controller's actual State ("States.COOL") via the TempCtrl channel,
rather than Sud's removed anticipatory flag - renamed
sud_cooling/set_sud_cooling to tc_cooling/set_tc_cooling to match.
This commit is contained in:
+10
-9
@@ -308,10 +308,11 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.statusBar().addPermanentWidget(self.status_label_env)
|
||||
self.update_status_env_label()
|
||||
|
||||
# Blinking indicator for a Sud ramp step that's cooling down
|
||||
# (target below the current temperature - the heater is forced off
|
||||
# server-side and we just wait for ambient loss to catch up).
|
||||
self.sud_cooling = False
|
||||
# Blinking indicator for the temperature controller's own COOL
|
||||
# state (target below the current temperature - the heater is
|
||||
# forced off server-side and we just wait for ambient loss to
|
||||
# catch up).
|
||||
self.tc_cooling = False
|
||||
self.status_label_cooling = QtWidgets.QLabel("Cool down")
|
||||
self.status_label_cooling.setStyleSheet("color: blue; font-weight: bold;")
|
||||
self.status_label_cooling.setVisible(False)
|
||||
@@ -496,7 +497,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.sud_step_type = None
|
||||
self.sud_hold_remaining = 0.0
|
||||
self.forecast_history = []
|
||||
self.set_sud_cooling(False)
|
||||
self.set_tc_cooling(False)
|
||||
self.update_sud_actions()
|
||||
self.update_status_env_label()
|
||||
self.setWindowTitle("BrewPi")
|
||||
@@ -551,10 +552,10 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
title += " - {}".format(description)
|
||||
return title
|
||||
|
||||
def set_sud_cooling(self, cooling):
|
||||
if cooling == self.sud_cooling:
|
||||
def set_tc_cooling(self, cooling):
|
||||
if cooling == self.tc_cooling:
|
||||
return
|
||||
self.sud_cooling = cooling
|
||||
self.tc_cooling = cooling
|
||||
if cooling:
|
||||
self.status_label_cooling.setVisible(True)
|
||||
self.cooling_blink_timer.start(500)
|
||||
@@ -651,6 +652,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
for key in msg:
|
||||
if 'State' in key:
|
||||
self.label_state.setText(msg['State'])
|
||||
self.set_tc_cooling(msg['State'] == 'States.COOL')
|
||||
elif "Soll" in key:
|
||||
submsg = msg['Soll']
|
||||
if 'Temp' in submsg:
|
||||
@@ -800,7 +802,6 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.sud_step_index = step.get('Index')
|
||||
self.sud_step_descr = step.get('Descr')
|
||||
self.sud_step_type = step.get('Type')
|
||||
self.set_sud_cooling(step.get('Cooling', False))
|
||||
self.update_status_step_label()
|
||||
elif "HoldRemaining" in key:
|
||||
self.sud_hold_remaining = msg['HoldRemaining']
|
||||
|
||||
Reference in New Issue
Block a user