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:
2026-06-24 23:30:37 +02:00
co-authored by Claude Sonnet 4.6
parent 787f02b8dc
commit 35d33530ef
2 changed files with 25 additions and 7 deletions
+5 -1
View File
@@ -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)