Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance mAh Used OSD Element #7868

Merged
merged 9 commits into from
May 7, 2022

Conversation

MrD-RC
Copy link
Collaborator

@MrD-RC MrD-RC commented Mar 2, 2022

Enhance the mAh Used OSD element

Requires Configurator change iNavFlight/inav-configurator#1475

  • Defaults to 4 digits (same as current OSD)
  • Will use mAh until it can no longer fit the space. After which, it will display in Ah, with decimal places. The decimals places are 10 mAh increments
  • Number of digits selectable. Currently 4 to 6. But the 6 is just a number that can be easily changed in settings.yaml.

Demo video shows increasing mAh used in a 4 precision display. After 9999 mAh it transitions to 10.00 Ah. It then increments every 10 mAh, 10.01 for example. Next, the precision is changed to 5 units of precision, and the OSD shows in mAh again, at around 10390 mAh.

Initial coding:
- Added parameter to set length of mAh Drawn
- Updated display code to use decimal places if the number is longer than the allowed length
Code working. Left placeholder in for alternate icon over 10,000 mAh.
@MrD-RC MrD-RC added this to the 5.0 milestone Mar 2, 2022
@MrD-RC MrD-RC changed the title Mr d add precision to m ah used for 9999m ah Enhance mAh Used OSD Element Mar 2, 2022
@DzikuVx DzikuVx merged commit 5ce41e5 into master May 7, 2022
@DzikuVx DzikuVx deleted the MrD_Add-precision-to-mAh-used-for-9999mAh branch May 7, 2022 17:03
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