Skip to content

Adding support for a minimum delay between stop and OK - #59

Merged
johnpolymath merged 1 commit into
mainfrom
hinke/delay-between-stop-ok
Jul 27, 2026
Merged

Adding support for a minimum delay between stop and OK#59
johnpolymath merged 1 commit into
mainfrom
hinke/delay-between-stop-ok

Conversation

@johnpolymath

Copy link
Copy Markdown
Contributor
  • Adding a default 1000ms delay between when a stop message arrives and when an OK message can arrive for a transition to OK

- Adding a default 1000ms delay between when a stop message
  arrives and when an OK message can arrive for a transition to OK
@johnpolymath
johnpolymath merged commit 3a77381 into main Jul 27, 2026
3 checks passed
@johnpolymath
johnpolymath deleted the hinke/delay-between-stop-ok branch July 27, 2026 18:48
iliabaranov added a commit that referenced this pull request Jul 28, 2026
pstop_c synced verbatim from main @ 3a77381 ('Adding support for a
minimum delay between stop and OK', #59) — library untouched, as
always. The library now refuses an OK arriving sooner than
delay_between_stop_ms after the STOP that opened the arming cycle
(replies STOP, stays STOPPED), re-evaluating as the OK stream
continues, so the same episode completes once the delay elapses.

Adopted library-native only (operator decision): the wrapper's own
hold-duration veto is retired — machine.toml min_stop_ms now feeds
app_config.delay_between_stop_ms directly, and the runner just logs
'ARMED' (with held time) or 'ANOMALY: arming DEFERRED' when the library
refuses an early OK. Semantic change vs the old wrapper veto: an EMC
blip now pauses the robot for min_stop_ms and then self-re-arms on the
steady OK stream, instead of latching STOPPED until a fresh press.

tools/pstop_test_remote.py updated to the new semantics and extended to
assert BOTH the early refusal and the delayed acceptance; all 7 wire
assertions pass against the rebuilt runner.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JRZvaANcTGNuMjJN2gVf8b
iliabaranov added a commit that referenced this pull request Jul 29, 2026
The library (#59) re-stamps stop_time_ms on every STOP message, so an
early OK is measured against the LAST STOP received — while the
wrapper's episode clock starts at the first. During a held press the
old line printed episode ages over the minimum labeled as under it.
Say what each number actually is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JRZvaANcTGNuMjJN2gVf8b
iliabaranov added a commit that referenced this pull request Jul 29, 2026
pytest suite driving a real remote through its actual E-stop loops and
USB power feed via the 4-ch relay board, asserted at a dedicated
machine_app_runner instance (chip peer slot 3, port 8894) so the bench
machine in slot 0 is never touched. Covers: press/release arming with
min_stop_ms timing, held-button, sub-min_stop blip deferral (#59),
single-channel discordance (comparator silence -> MISSED_HEARTBEATS,
no STOP on the wire, no re-arm on heal), power-loss recovery and
cold-boot no-self-arm, boot-with-button-held. Unwired benches skip
cleanly; test_00_rig validates the wiring itself.

Driver: retry idempotent commands once — the board occasionally
swallows a command arriving right after its previous reply.

run.sh isolates the venv from ROS PYTHONPATH pytest plugins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant