Infineon / XMC-for-Arduino

Integration of Infineon's XMC microcontrollers into the Arduino IDE.
Other
103 stars 64 forks source link

fix implementation of dtostrf #263

Closed ederjc closed 5 months ago

ederjc commented 5 months ago

By creating this pull request you agree to the terms in CONTRIBUTING.md. https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md --- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description Implementation of dtostrf() was based on sprintf(), which is not implemented for floats/doubles in Arduino according to [1]. This PR replaces dtostrf() implementation by one which is not based on sprintf() (reference is stdlib_noniso.h by Ivan Grokhotkov under GNU LGPL).

Context Tested with XMC for Arduino 3.0 and XMC1100 2Go board.

[1] https://forum.arduino.cc/t/sprintf-with-float-values/937562