Gh4 cleanup#155
Merged
Merged
Conversation
…ration (arena-fw reiserlab#4) Match the firmware's canonical trial-params re-layout: gain moves after init_pos and widens to int16, and a new duration field (seconds at the JS API boundary, encoded as 10ms ticks) lets the controller auto-stop a trial on its own. - encodeTrialParams: reordered params, gain now i16le, duration converts seconds -> ticks; dropped the now-dead int8Byte helper - buildTrialParams: carries duration through from the trialParams command (same seconds convention as conditionDuration's wait/trialParams math) - hostSideTrialEnd/SWAP POINT comment untouched — host-side timing stays authoritative for now; wire-side duration just unblocks the future swap - tests: rewrote trial-params golden vectors + runner fixtures for the new offsets and widened gain range
mbreiser
added a commit
that referenced
this pull request
Jul 8, 2026
…L_PARAMS wire (v0.40) Rides the fw #4 re-layout merged from PR #155 (gain int16 after init_pos, controller-run duration in 10 ms ticks, optional duty 12th param byte, fw #33). Console Arena Trial panel: - duration (s) now rides the wire — the CONTROLLER times the stop; the host arms a backup STOP 2 s later and the log says which one fired - new optional duty field (0-255, blank = pattern's stored duty -> byte omitted); encoder rejections surface in the bench log instead of an unhandled rejection - gain input widened to the int16 bounds (+/-32767) - TRIAL_PARAMS log line records full provenance: mode/pat/rate/init/gain/dur/duty - help-mode entry + tooltips for the new fields Requires the fw #4/#39 firmware build — older firmware MISREADS the re-laid-out params (not just the duty byte), so flash before pointing v0.40 at an arena. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mbreiser
added a commit
that referenced
this pull request
Jul 8, 2026
… (compat) Bench prep for the fw #39 rollout: with the runner sending real durations, the controller blanks the display at exactly `duration` seconds, where protocols authored against host timing expect the pattern to keep playing until the next command (often through the ITI) — observed as "timing off" vs. previous runs. buildTrialParams now pins the WIRE duration to 0 (no controller auto-stop); host-side timing (hostSideTrialEnd) remains the authoritative trial clock, and durationSec / conditionDuration / the scope's trial shading still read cmd.duration directly, so every existing protocol runs identically to pre-#155 behavior with NO YAML changes. The Console bench form still sends a real duration on purpose — that's where fw #4 controller timing gets exercised. Re-enable in the runner together with the await-run-complete timing swap (both flip points are cross-referenced in the code). Tests: wire-duration-pinned check + goldens back to 00 00 duration bytes; durationSec-carried assertion unchanged proves host timing intact. 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.
This accompanies reiserlab/LED-Display_G6_Firmware_Arena#39
This does not expose duty cycle in the Arena Studio yet.