feat: Web UI overhaul — modern HUD dashboard (#43) #45

Merged
seb merged 1 commits from sl-firmware/web-ui-overhaul into main 2026-02-28 22:58:14 -05:00
Collaborator

Summary

  • 3-column HUD: LEFT telemetry gauges, CENTER 3D SaltyBot, RIGHT comms stats
  • Artificial horizon (canvas): pitch/roll ladder, roll arc, fixed reticle
  • Compass tape (canvas): 70° yaw window, cardinal labels, heading readout
  • RC sticks (canvas): dual joystick overlays for CH1–4 (µs values)
  • Mode badge: MANUAL/ASSISTED/AUTO with colour coding
  • Jetson dot: live/dead indicator from ja field
  • PID sliders (bottom bar): KP/KI/KD/SP/MAX with APPLY + QUERY
  • Collapsible log console: timestamped raw JSON output
  • Tailwind CSS CDN: dark cyberpunk theme, neon cyan + orange accents

Firmware additions (src/main.c, usbd_cdc_if.c)

  • txc / rxc: USB telemetry TX and RX packet counters
  • ja: Jetson active flag (1 when jetson_cmd_is_active())
  • ch1ch4: CRSF channels 1–4 mapped to µs via crsf_to_range(), sent alongside rssi/lq when RC alive
  • buf: 256→320 bytes for headroom

Closes #43.

## Summary - **3-column HUD**: LEFT telemetry gauges, CENTER 3D SaltyBot, RIGHT comms stats - **Artificial horizon** (canvas): pitch/roll ladder, roll arc, fixed reticle - **Compass tape** (canvas): 70° yaw window, cardinal labels, heading readout - **RC sticks** (canvas): dual joystick overlays for CH1–4 (µs values) - **Mode badge**: MANUAL/ASSISTED/AUTO with colour coding - **Jetson dot**: live/dead indicator from `ja` field - **PID sliders** (bottom bar): KP/KI/KD/SP/MAX with APPLY + QUERY - **Collapsible log console**: timestamped raw JSON output - **Tailwind CSS CDN**: dark cyberpunk theme, neon cyan + orange accents ## Firmware additions (src/main.c, usbd_cdc_if.c) - `txc` / `rxc`: USB telemetry TX and RX packet counters - `ja`: Jetson active flag (1 when `jetson_cmd_is_active()`) - `ch1`–`ch4`: CRSF channels 1–4 mapped to µs via `crsf_to_range()`, sent alongside `rssi`/`lq` when RC alive - buf: 256→320 bytes for headroom Closes #43.
seb approved these changes 2026-02-28 22:45:07 -05:00
seb left a comment
Owner

Flash-tested, builds and streams. New telemetry fields present.

Flash-tested, builds and streams. New telemetry fields present.
Owner

Cannot merge — changed_files=0. The branch appears to have no diff against main. @sl-firmware please check that your commits are actually pushed to this branch. Did you forget to git push?

Cannot merge — `changed_files=0`. The branch appears to have no diff against main. @sl-firmware please check that your commits are actually pushed to this branch. Did you forget to `git push`?
sl-webui added 1 commit 2026-02-28 22:50:29 -05:00
ui/index.html — full dashboard rewrite:
- 3-column layout: LEFT telemetry gauges, CENTER 3D SaltyBot, RIGHT comms
- LEFT: artificial horizon (canvas, pitch/roll/ladder/roll-arc), yaw compass
  tape, pitch/roll/yaw readouts, bidirectional motor bar, battery bar, BME280
  environment section (auto-shows on data), MAG heading row
- CENTER: Three.js SaltyBot model (PR#41) with ground plane + animated
  wheel rolling proportional to motor_cmd
- RIGHT: USB tx/rx packet counters, mode badge (MANUAL/ASSISTED/AUTO),
  CRSF RSSI/LQ, dual RC stick overlay canvases (CH1–4), Jetson active dot
- BOTTOM: KP/KI/KD/SP/MAX sliders with APPLY + QUERY, collapsible log console
- Style: Tailwind CSS CDN, dark cyberpunk theme, neon cyan + orange accents

src/main.c — telemetry JSON additions:
- buf: 256 → 320 bytes (headroom for new fields)
- ja: Jetson active flag (0/1) via jetson_cmd_is_active()
- txc: TX telemetry frame counter (uint32, main-loop local)
- rxc: RX CDC packet counter (cdc_rx_count from usbd_cdc_if)
- ch1–ch4: CRSF channels mapped to µs (1000–2000) via crsf_to_range(),
  appended alongside rssi/lq when RC is alive

lib/USB_CDC/src/usbd_cdc_if.c:
- cdc_rx_count: volatile uint32_t, incremented in CDC_Receive on every
  packet; extern'd in main.c for telemetry

Closes #43.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
seb merged commit 2f33421956 into main 2026-02-28 22:58:14 -05:00
Sign in to join this conversation.
No Reviewers
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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