nx_jam_response.nx
buildroot/runtime/nx_jam_response.nx
about
nx_jam_response.nx -- the JAM -> ACTION loop (auto-pause on a real jam, debounced
so a single noisy reading never false-pauses a good print).
Composes nx_jam_detect (per-window clog/grind verdict) into a policy:
- a transient (1 window) jam -> CONTINUE (debounce)
- >= alert_after consecutive -> ALERT (warn operator)
- >= pause_after consecutive -> PAUSE (auto-pause via Moonraker)
Any OK window resets the streak. This is the sovereign "brain"; the last-mile
pause command is sent by the existing nx_moonraker_client. license_tier: ORIGINAL.
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_jam_detect.nx
imported by: nx_jam_response_test.nx
structs
| none |
consts
| 14 | const JR_CONTINUE: i64 = 0 |
| 15 | const JR_ALERT: i64 = 1 |
| 16 | const JR_PAUSE: i64 = 2 |
functions
| 20 | func jr_step(jam_verdict: i64, consec: *i64, alert_after: i64, pause_after: i64) -> i64 called by 1: window |