Skip to content

USB serial state interface: DSP-authoritative ACK, display watchdog, STATUS/LEVEL/HELP - #4

Closed
xmutantson wants to merge 2 commits into
ARSFI:masterfrom
xmutantson:feat/usb-state-interface
Closed

xmutantson wants to merge 2 commits into
ARSFI:masterfrom
xmutantson:feat/usb-state-interface

Conversation

@xmutantson

Copy link
Copy Markdown

Adds an optional USB serial state interface on top of the existing command set. It is independent of the serial-mode bug fixes (PR #2) and preserves the legacy OK / ? replies.

What it adds

  • DSP-authoritative ACK. After each command, the firmware echoes the live DSP state and ends the reply with OK or ERROR. The DSP is the single source of truth; the reply is not a blind echo of the request, so a command that fails to take effect reports ERROR.
  • DSP-to-display watchdog. A one-way watchdog with change detection keeps the front-panel display in sync with the DSP state and repaints at least every 30 seconds.
  • STATUS — reports the live channel mode and current S:N.
  • LEVEL — reports the measured input level in mVp-p.
  • HELP (also ?) — prints the command list with valid ranges, terminated by END HELP.

Scope

Behavior/feature only. No serial-mode bug fixes, no MPG-header change, no RESET/CODECINIT. Based directly on master.

Verification

  • Python unit test for feature independence and DSP-authoritative behavior passes.
  • Both sketches (Teensy 4.0 standard, Teensy 4.1 Proto) compile.

On an unamended master, the ACK will correctly surface a mode-selection mismatch as ERROR; once PR #2's fixes are merged, the same interface confirms the corrected state as OK.

Apply the parsed channel mode to the live DSP for every serial SIM
parameter-page command (not only WGN-MPD): assign intMode and force
reinitialization. Bound BUSY CH1 IN to the nine-element fltLogs table;
apply MULTIPATHS, OFFSET and FM-deviation routing immediately; restore
fade rate, FM rate and FM amplitude from EEPROM into the DSP at boot;
reject empty and non-numeric parameters before the setters coerce them
to zero; correct the FM-rate display multiplier (10 * fltLogs). Updates
the regression tests for both sketches.
…L/HELP)

Echo the live DSP state after each command, ending in OK or ERROR, as the
single source of truth. Add a one-way DSP-to-display watchdog with change
detection and a 30-second repaint. Add STATUS (mode and S:N), LEVEL (input
level in mVp-p) and HELP (command and range listing ending END HELP).
Legacy OK and ? replies preserved. With the watchdog now owning the
display, remove the redundant ParseSetParameter parser. Based on the
PR ARSFI#2 branch (apply after PR ARSFI#2).
@xmutantson

Copy link
Copy Markdown
Author

Superseded by the consolidated correctness PR #5. The replacement incorporates the STATUS/LEVEL/HELP and state-interface work, corrects the ancillary-command profile-replacement regression, moves acknowledgment after DSP application, and adds sequence-level and state-truthfulness coverage.

@xmutantson xmutantson closed this Sep 21, 2026
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