Skip to content

Show live PWM values and allow runs with no board - #184

Merged
gbradham merged 2 commits into
mainfrom
claude/pwm-live-state
Sep 30, 2026
Merged

gbradham merged 2 commits into
mainfrom
claude/pwm-live-state

Conversation

@gbradham

Copy link
Copy Markdown
Member

Two runner fixes reported from the rig.

  • PWM and servo cards didn't update during a run. Both device-state panels (Run tab and dashboard) only read _state. PWM outputs keep their level in _value and servos in _angle, so their cards stayed frozen while digital outputs updated. The four copies of the display logic are now one helper, device_status.device_state_display. PWM shows its duty cycle as a percentage and servos show their angle. Analog inputs now scale by the board's actual ADC resolution instead of a hardcoded 1023.
  • An experiment with no board could not start. The START readiness gate required a connected board even when the session configures none, so a video-only experiment was always blocked. A session with no boards is now treated as board-ready, and the Setup page shows "None needed". The core start path already handled zero boards: connecting none succeeds and the run proceeds. The flow still needs a StartExperiment node.

Full suite: 5818 passed, 4 skipped. ruff and black are clean.

Both device-state panels only read _state, which digital outputs have but
PWM outputs (_value) and servos (_angle) do not, so those cards never
changed during a run. The display logic now lives once in
device_status.device_state_display: PWM shows its duty cycle, servos their
angle, and analog inputs scale by the board's real ADC resolution.
Readiness required a connected board even when the session had none to
connect, so a video-only experiment could never start. A session with no
boards is now board-ready ("None needed"); the core already starts such a
run cleanly.
@gbradham
gbradham merged commit 32aa48a into main Sep 30, 2026
4 checks passed
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