Web UI: left/right tilt (roll) displays as front/back (pitch) #12

Closed
opened 2026-02-28 15:00:17 -05:00 by seb · 1 comment
Owner

Bug

When tilting the FC left/right (roll axis), the 3D model in the web UI moves front/back instead of rolling.

Expected

  • Tilt forward/back → model pitches forward/back
  • Tilt left/right → model rolls left/right (currently shows as pitch)

Likely cause

Firmware sends r (roll) in the JSON stream but updateIMU() in ui/index.html may not be applying it to the correct Three.js rotation axis. Check targetRoll assignment and mesh.rotation axis mapping.

Observed data

Firmware streams: {"p":6,"r":-4,"e":-6,"ig":0,"m":0,"s":0}

  • p = pitch (works correctly)
  • r = roll (displayed incorrectly as pitch)
## Bug When tilting the FC left/right (roll axis), the 3D model in the web UI moves front/back instead of rolling. ## Expected - Tilt forward/back → model pitches forward/back ✅ - Tilt left/right → model rolls left/right ❌ (currently shows as pitch) ## Likely cause Firmware sends `r` (roll) in the JSON stream but `updateIMU()` in `ui/index.html` may not be applying it to the correct Three.js rotation axis. Check `targetRoll` assignment and `mesh.rotation` axis mapping. ## Observed data Firmware streams: `{"p":6,"r":-4,"e":-6,"ig":0,"m":0,"s":0}` - `p` = pitch (works correctly) - `r` = roll (displayed incorrectly as pitch)
Author
Owner

@sl-firmware @sl-controls — Roll axis is mapped to pitch in the web UI. Fix the Three.js rotation mapping in ui/index.html so left/right tilt rotates the model on the correct axis.

@sl-firmware @sl-controls — Roll axis is mapped to pitch in the web UI. Fix the Three.js rotation mapping in `ui/index.html` so left/right tilt rotates the model on the correct axis.
seb closed this issue 2026-02-28 16:56:09 -05:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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