1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00
betaflight/src/main/osd
Bruce Luckcuck b5bf9c2b4c Add a common function used to print formatted floats in the OSD
Updated the OSD element and stats rendering code to use this fuction to print floating point values of varying precisions.

Will make adding OSD element variants that provide different decimal precisions (like voltage, amperage, etc.) easy to implement since all that needs to change is the `decimalPlaces` passed to the function. As an example, see the `osdFormatAltitudeString()` function.

If at some later date a more capable `printf` package is inplemented, then the guts of the `osdPrintFloat()` function could just be simplified while leaving the abstraction in place.
2021-02-17 08:09:52 -05:00
..
osd.c Add a common function used to print formatted floats in the OSD 2021-02-17 08:09:52 -05:00
osd.h Add a common function used to print formatted floats in the OSD 2021-02-17 08:09:52 -05:00
osd_elements.c Add a common function used to print formatted floats in the OSD 2021-02-17 08:09:52 -05:00
osd_elements.h Add a common function used to print formatted floats in the OSD 2021-02-17 08:09:52 -05:00
osd_warnings.c Separate OSD warnings from OSD task and make available via MSP 2021-02-13 14:11:38 -05:00
osd_warnings.h Separate OSD warnings from OSD task and make available via MSP 2021-02-13 14:11:38 -05:00