techfixpros / minimosd-extra

Automatically exported from code.google.com/p/minimosd-extra
0 stars 0 forks source link

show decimals like 0.6m for the home altitude. #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is enhancement suggestion:
Is it possible to show decimals like 0.6m for altitude?
For all flying multicopters alt above the ground is critical. Most of flight 
controllers are using MS5611 pressure sensor with 0.1m resolution. It will be 
great to see decimals of altitude if it is, lets say less then 10m above the 
ground level (home altitude). This range and decimal option can be configurable.

Looks like to enable decimals in alt to be always shown the following changes 
in code need to be done:

In OSD_Panels.ino line 585
    osd.printf("%5.0f%c", (double)(osd_alt_to_home * converth), high);
should be changed to 
    osd.printf("%7.1f%c", (double)(osd_alt_to_home * converth), high);

Having Arduino dev experience I can't proper open and compile the project from 
the sources. 

can someone recompile the code to hex with this changes?

Original issue reported on code.google.com by i...@koronker.ru on 23 Oct 2013 at 4:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
here is a better code    
//    if Altitude closer to home/ground then 10 meters show decimal in home 
altitude
    if (abs(osd_alt_to_home) < 10 )  { osd.printf("%5.1f%c", (double)(osd_alt_to_home * converth), high);}
        else  { osd.printf("%5.0f%c", (double)(osd_alt_to_home * converth), high);}

Please include it into next version.

Original comment by i...@koronker.ru on 24 Oct 2013 at 2:47

GoogleCodeExporter commented 9 years ago
Closed as we have a new version.

Ifthe problem is still present please reopen it.

Original comment by gabek...@gmail.com on 28 Nov 2014 at 11:44