Skip to content

Update throttle gauge skip#11101

Merged
sensei-hacker merged 1 commit intomasterfrom
MrD_Update-throttle-guage-skip
Nov 4, 2025
Merged

Update throttle gauge skip#11101
sensei-hacker merged 1 commit intomasterfrom
MrD_Update-throttle-guage-skip

Conversation

@MrD-RC
Copy link
Member

@MrD-RC MrD-RC commented Nov 4, 2025

PR Type

Enhancement


Description

  • Refactors throttle gauge skip logic to use quantized values

  • Replaces absolute difference threshold with exact quantization match

  • Improves rendering efficiency by reducing unnecessary redraws


Diagram Walkthrough

flowchart LR
  A["Throttle Position Input"] --> B["Quantize: thrPos / (OSD_THROTTLE_GAUGE_HEIGHT_ROWS * 2)"]
  B --> C["Compare with Previous Quantized Value"]
  C --> D{"Values Match?"}
  D -->|Yes| E["Skip Redraw"]
  D -->|No| F["Redraw Gauge"]
  F --> G["Update Previous Value"]
Loading

File Walkthrough

Relevant files
Enhancement
osd_canvas.c
Quantize throttle gauge skip logic                                             

src/main/io/osd_canvas.c

  • Changed skip condition from ABS(prevThr - thrPos) < 10 to prevThr ==
    (uint8_t)(thrPos / (OSD_THROTTLE_GAUGE_HEIGHT_ROWS * 2))
  • Updated prevThr assignment to store quantized throttle value instead
    of raw position
  • Implements quantization-based comparison for more precise redraw
    control
+2/-2     

@MrD-RC MrD-RC added this to the 9.0 milestone Nov 4, 2025
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Nov 4, 2025

PR Compliance Guide 🔍

(Compliance updated until commit 9010cac)

All compliance sections have been disabled in the configurations.


Previous compliance checks

Compliance check up to commit 9010cac

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@MrD-RC MrD-RC requested a review from sensei-hacker November 4, 2025 18:32
Copy link
Member

@sensei-hacker sensei-hacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks.

@sensei-hacker sensei-hacker merged commit c676075 into master Nov 4, 2025
21 checks passed
@MrD-RC MrD-RC deleted the MrD_Update-throttle-guage-skip branch November 11, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants