bench and catalog: the controller's cancel messages spell canceled; the needles follow

This commit is contained in:
ScottW514
2026-09-02 08:58:59 -04:00
parent 3b21057dfe
commit 0f28427c22
4 changed files with 28 additions and 28 deletions
+11 -11
View File
@@ -35,7 +35,7 @@ reported messages:
sender connection and the armed window, and carry a fresh
ts_mono
10. the job start survives a pause: a job paused and resumed by the
button, then cancelled by the lid, returns to where the job began,
button, then canceled by the lid, returns to where the job began,
not to where it was paused (the core restarts a held cycle through
Idle); a job abandoned in a hold and reset ends there, so the next
job's start is captured afresh where it begins
@@ -67,8 +67,8 @@ DISARMED = "laser disarmed - latch locked"
BLOCKED = "laser fire blocked"
PROMPT = "press the button to start the laser job"
RESUME_PROMPT = "press the button to resume the laser job"
LID_CANCEL = "lid opened during arm - job cancelled"
LOOP_CANCEL = "interlock open during arm - job cancelled"
LID_CANCEL = "lid opened during arm - job canceled"
LOOP_CANCEL = "interlock open during arm - job canceled"
# EV_SW words for the file-backed switch source: bit 2 button, bit 3 doors
# (set = closed), bit 5 interlock loop (set = OPEN).
@@ -727,7 +727,7 @@ def test_lid_open_in_wait():
if ARMED in "".join(s.log):
fail("[loop-in-wait] armed despite the open interlock loop")
print("PASS [lid-in-wait]: lid or interlock open during the arm wait "
"cancelled the job and never armed")
"canceled the job and never armed")
finally:
s.close()
@@ -784,7 +784,7 @@ def test_lid_cancels_and_returns():
time.sleep(0.5)
x_mid = s.mpos_x()
s.set_switches(SW_LID_OPEN)
if not wait_for(s.log, "lid opened - job cancelled", 5, s.sock):
if not wait_for(s.log, "lid opened - job canceled", 5, s.sock):
fail("[lid-cancel] the lid open did not cancel the job")
if not wait_for(s.log, DISARMED, 5, s.sock):
fail("[lid-cancel] the cancel did not close the armed window")
@@ -800,7 +800,7 @@ def test_lid_cancels_and_returns():
x_end = s.mpos_x()
if x_end is None or abs(x_end) > 0.05:
fail("[lid-cancel] head not back at the job start: MPos X=%s (was %s mid-job)" % (x_end, x_mid))
print("PASS [lid-cancel]: lid open mid-job -> cancelled, disarmed, reset banner, "
print("PASS [lid-cancel]: lid open mid-job -> canceled, disarmed, reset banner, "
"returned to X=%.3f (mid-job X=%.3f), Idle, no alarm" % (x_end, x_mid))
s.close()
# Interlock variant.
@@ -808,11 +808,11 @@ def test_lid_cancels_and_returns():
start_armed_move(s, "loop-cancel", gcode="G1 X20 F600")
time.sleep(0.5)
s.set_switches(SW_LOOP_OPEN)
if not wait_for(s.log, "interlock open - job cancelled", 5, s.sock):
if not wait_for(s.log, "interlock open - job canceled", 5, s.sock):
fail("[loop-cancel] the interlock open did not cancel the job")
if not wait_for(s.log, "returned to the job start", 15, s.sock):
fail("[loop-cancel] no return to the job start after the interlock cancel")
print("PASS [loop-cancel]: interlock open mid-job -> cancelled and returned")
print("PASS [loop-cancel]: interlock open mid-job -> canceled and returned")
finally:
s.close()
@@ -839,7 +839,7 @@ def test_pause_then_lid_cancel_returns_to_the_job_start():
fail("[pause-lid-cancel] the second press did not resume (state %s)" % s.state())
time.sleep(0.4)
s.set_switches(SW_LID_OPEN)
if not wait_for(s.log, "lid opened - job cancelled", 5, s.sock):
if not wait_for(s.log, "lid opened - job canceled", 5, s.sock):
fail("[pause-lid-cancel] the lid open did not cancel the job")
if not wait_for(s.log, "returned to the job start", 15, s.sock):
fail("[pause-lid-cancel] the head did not report returning to the job start")
@@ -899,8 +899,8 @@ def test_lid_policy_hold():
if not s.wait_state("Door", 3):
fail("[lid-hold] the lid open did not park the job in Door (state %s)" % s.state())
read_avail(s.sock, s.log, 1.0)
if "job cancelled" in "".join(s.log):
fail("[lid-hold] the hold policy cancelled the job")
if "job canceled" in "".join(s.log):
fail("[lid-hold] the hold policy canceled the job")
s.set_switches(SW_CLOSED)
time.sleep(0.5)
s.sock.sendall(b"~")
+4 -4
View File
@@ -1272,12 +1272,12 @@ def drill_pcurve(g):
aborted = 'rung %d did not finish (state=%s)' % (idx + 1, st)
break
if t_run1 - t_run0 < line_s - 1.5:
# A line that ended early was cancelled by the operator or
# A line that ended early was canceled by the operator or
# the controller, and a cancel may have moved the head
# (the controller returns to machine zero). From here every
# relative move is aimed from a position this drill no
# longer knows, so send nothing more.
aborted = ('rung %d ran %.1f s of %.1f: cancelled; no further '
aborted = ('rung %d ran %.1f s of %.1f: canceled; no further '
'moves sent' % (idx + 1, t_run1 - t_run0, line_s))
break
rungs.append({'rung': idx + 1, 'repeat': repeat, 'pct': pct,
@@ -1486,9 +1486,9 @@ def drill_dpatch(g):
% (i + 1, st, cs.get('verdict'), cs.get('reason')))
break
if t_run1 - t_run0 < 0.5 * est_s:
# Cut short: cancelled, and a cancel may have moved the
# Cut short: canceled, and a cancel may have moved the
# head, so every relative move from here is aimed blind.
aborted = ('patch %d ran %.1f s of ~%.0f: cancelled; no further '
aborted = ('patch %d ran %.1f s of ~%.0f: canceled; no further '
'moves sent' % (i + 1, t_run1 - t_run0, est_s))
break
p.update({'t_m3': t_m3, 't_run0': t_run0, 't_run1': t_run1})