code wiki / (root) / nx_jam_response.nx

nx_jam_response.nx

buildroot/runtime/nx_jam_response.nx

1169 B26 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic jam
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_jam_detect.nx nx_jam_response.nx nx_jam_response_test.nx

imports: nx_syscalls.nxnx_jam_detect.nx

imported by: nx_jam_response_test.nx

structs

none

consts

14const JR_CONTINUE: i64 = 0
15const JR_ALERT: i64 = 1
16const JR_PAUSE: i64 = 2

functions

20func jr_step(jam_verdict: i64, consec: *i64, alert_after: i64, pause_after: i64) -> i64
called by 1: window