Adding support for a minimum delay between stop and OK - #59
Merged
Conversation
johnpolymath
commented
Jul 27, 2026
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.