feat: Gyro recalibration button in web UI (#32) #39

Merged
seb merged 1 commits from sl-firmware/gyro-recal-button into main 2026-02-28 21:58:05 -05:00
Collaborator

Adds G CDC command to trigger gyro recalibration from the web UI.

Changes

  • safety_refresh() null-guard in safety.c (safe to call before safety_init())
  • mpu6000_calibrate() calls safety_refresh() every 40ms to prevent IWDG reset during re-cal
  • cdc_recal_request flag in usbd_cdc_if.c, case G in CDC_Receive
  • Main loop handles recal: disarm → recalibrate
  • GYRO CAL button in ui/index.html sends G, shows status message

Fixes #32

Adds `G` CDC command to trigger gyro recalibration from the web UI. ## Changes - `safety_refresh()` null-guard in `safety.c` (safe to call before `safety_init()`) - `mpu6000_calibrate()` calls `safety_refresh()` every 40ms to prevent IWDG reset during re-cal - `cdc_recal_request` flag in `usbd_cdc_if.c`, `case G` in `CDC_Receive` - Main loop handles recal: disarm → recalibrate - GYRO CAL button in `ui/index.html` sends `G`, shows status message Fixes #32
sl-firmware added 1 commit 2026-02-28 21:50:42 -05:00
Add 'G' CDC command that disarms and re-runs gyro bias calibration.
safety_refresh() added to calibration loop (every 40ms) so IWDG
does not trip during the 1s blocking re-cal when watchdog is running.
GYRO CAL button in ui/index.html sends 'G' and shows status feedback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
seb approved these changes 2026-02-28 21:57:55 -05:00
seb left a comment
Owner

Flash-tested all 5 PRs together. Builds, streams, no conflicts.

Flash-tested all 5 PRs together. Builds, streams, no conflicts.
seb merged commit a118582374 into main 2026-02-28 21:58:05 -05:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#39
No description provided.