Closed martinjaeger closed 2 years ago
I'm converting this into a draft PR now. The function doesn't seem to be ready... For example 52.99
with precision set to 1 produces 52.10
. We need to revisit the algorithm and add more test cases before merging.
Zephyr now supports picolibc, which should provide a reliable solution for lower-footprint float printf.
Disabling float support in the firmware via Kconfig and using this replacement instead saved about 4.5 kB of flash during my tests.
Please double-check if the approach makes sense and if I may have missed any important edge cases.