AP_OSD: use Betaflight SYM_TOTAL_DISTANCE for DisplayPort distance icon - #33908
Conversation
The BTFL symbol table mapped SYM_DIST to 0x04, which is SYM_THR (throttle icon). Remap to 0x71 (SYM_TOTAL_DISTANCE). Fixes ArduPilot#33895
|
Tested manually on hardware: MicoairH743v2 + DJI O4 and O4 Pro + Goggles 3. Total distance icon displayed correctly. I would also fix missing LQ icon (betaflight uses: #define SYM_LINK_QUALITY 0x7B, betaflight define): and would be nice to add SYM_THR (0x04) for throttle value. |
|
Was the original 0x04 wrong-as-merged, or are we going to do things like break older googles/OSD setups with this change? |
According to git blame of betaflight file total distance and link quality sybols were defined 7 years ago, and since then there were no changes. |
|
I'm tempted to merge this as-is because it is an improvement. @coreyfarley are you planning on fixing up the other items that @boa-pe brought up either here or in another PR? No huge pressure of course |
|
@rmackay9 I think I'll add the link quality change here and then tackle the throttle icon in another PR, if you agree? |
Remap SYM_LQ from 0xF8, which rendered no icon on DJI goggles, to 0x7B, defined as SYM_LINK_QUALITY in Betaflight's osd_symbols.h
|
Do you think you could test these fixes? I'm happy to make a binary for you if necessary (just remind me of your autopilot). |
|
Automated review note — AI-generated (Claude), cross-checked by an independent second model against the live diff. Please sanity-check before acting. Reviewed at head Verdict: APPROVE No blockers.
Full report: https://uav.tridgell.net/DevCallReviews/2026_08_11/devcall_pr_reviews.html |
This didn't actually answer my question. |
Summary
Fixes the DJI O4 OSD showing a throttle icon next to the distance-flown panel by remapping SYM_DIST from 0x04 to 0x71 in the MSP DisplayPort BTFL font table.
Also remaps SYM_LQ from 0xF8, which rendered no icon, to 0x7B (SYM_LINK_QUALITY).
Fixes #33895
Classification & Testing (check all that apply and add your own)
Hardware testing by @boa-pe: MicoairH743v2 + DJI O4 and O4 Pro + Goggles 3 and both icons confirmed displaying correctly (see PR comments)
Compiled successfully for SITL copter.
Glyph correctness verified against the OSD glyph reference
The reporter's parameter file (shared in the forum thread) confirms MSP_OPTIONS=4 (Betaflight fonts) and OSD_TYPE=5 (MSP DisplayPort)
Description
The OSDn_DIST (distance flown) panel prefixes its values with SYM_DIST.
On MSP DisplayPort with Betaflight fonts enabled, SYM_DIST was mapped to font index 0x04 which in the Betaflight font is SYM_THR. This resulted in the DJI goggles drawing a throttle symbol next to the distance value. This remap to 0x71 is the proper total distance glyph Betaflight uses - SYM_TOTAL_DISTANCE.
SYM_LQ (link quality) was similar, mapped to 0xF8 which has no glyph defined in the Betaflight font, so no icon rendered. 0x7B is defined as SYM_LINK_QUALITY in osd_symbols.h