Fix step-1-skipped-on-restart race and Progress tab step number mismatch
Re-enabling the temp controller landed unconditionally in HOLD and relied on the next tick to correct it, but SudTask.on_process() reads is_holding() synchronously in the same call chain that pushes a fresh step's setpoint - so a restart could finish a hold-less step instantly instead of actually ramping. Resolve the FSM against the real gap right away instead. Also fix the status bar showing one step number below what the Progress tab's plates show for the same step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189FkmyJkY77HqsNomr1DwV
This commit is contained in:
@@ -1181,7 +1181,11 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
|
||||
def update_status_step_label(self):
|
||||
if self.sud_step_descr:
|
||||
text = "Step {}: {}".format(self.sud_step_index, self.sud_step_descr)
|
||||
# +1: sud_step_index is the 0-based index Sud.index uses, but
|
||||
# StepPlate (the Progress tab) labels steps 1-based - match it
|
||||
# here so the status bar doesn't announce a step one number
|
||||
# below what the Progress tab shows for the same step.
|
||||
text = "Step {}: {}".format(self.sud_step_index + 1, self.sud_step_descr)
|
||||
if self.sud_step_type == 'hold':
|
||||
remaining = max(self.sud_hold_remaining, 0.0)
|
||||
text += " ({:.0f}:{:02.0f} remaining)".format(remaining // 60, remaining % 60)
|
||||
|
||||
Reference in New Issue
Block a user