Conversation
The scrolling altitude and speed sidebars moved the wrong way. A rising value scrolled the scale upwards, so the numbers travelling towards the center marker got smaller as the value grew. No reference instrument behaves like that. The scale glyphs SYM_AH_DECORATION_MIN..SYM_AH_DECORATION_MAX draw their tick marks progressively lower inside the character cell, so the step count is now added to the symbol instead of subtracted. A rising value now scrolls the scale downwards and brings the higher numbers down towards the center marker, the way a primary flight display works. The existing wrap around keeps the symbol inside the font range for either sign, so only the direction changes. The trend arrows are left alone, they report whether the value is rising or falling and not which way the scale moves. Only the grid OSD path is affected, the pixel OSD draws its sidebars through the sidebar widget instead. Fixes iNavFlight#9195
Raffi1202
marked this pull request as ready for review
September 11, 2026 15:36
Contributor
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoFix grid OSD sidebar scroll direction
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #9195: with
osd_left_sidebar_scroll/osd_right_sidebar_scrollset to altitude or speed, the scrolling scale beside the artificial horizon on the character OSD moves the wrong way. @malinhiles' DVR clip shows airspeed falling and altitude rising while the tick marks travel opposite to the Garmin tape the sidebars emulate, where a rising value brings the higher numbers down towards the centre marker. @b14ckyy confirmed it and noted the pixel OSD scrolls correctly.Cause
osdUpdateSidebar(),src/main/io/osd_grid.c:303on maintenance-10.x:decoration -= steps % SYM_AH_DECORATION_COUNT;. The glyphsSYM_AH_DECORATION_MIN..MAX(0x12E..0x133) draw their tick marks 3 px lower for each higher code in every analogue font, so subtracting walks the ticks upwards as the value rises. The pixel OSD draws its sidebars viaosdCanvasDrawSidebars()(osd_common.c:364) and never reaches this line.release/9.1has the same line atosd_grid.c:303.Change
Adds the step count instead of subtracting it and documents the glyph order in a comment above the line. A rising value now scrolls the scale downwards, bringing the higher numbers towards the centre marker. The existing wrap-around keeps the code inside the font range for either sign; the trend arrows and the pixel OSD path are untouched.
Test
Not run on hardware or SITL. Cause verified by reading
osd_grid.c:303and by decoding glyphs 302-307 of all eight Configurator analogue fonts (resources/osd/analogue/*.mcm): each higher code shifts the ticks 3 px down, and six codes span the 18 px cell, which the wrap-around relies on. The upstream Build firmware run for this PR (https://github.com/iNavFlight/inav/actions/runs/34532676799) is waiting for maintainer approval and has not built. The commit cherry-picks ontorelease/9.1without conflicts (git merge-tree).Flash / RAM
Not measured yet. The upstream firmware CI has not been released for this PR, so no size report exists.
Docs
No documentation change needed: neither
docs/OSD.md(OSD_HORIZON_SIDEBARS) nordocs/Settings.md(osd_*_sidebar_scroll) describes the scroll direction, and no setting or default changes.