arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.11k stars 7k forks source link

M0 + M4 floating point formatting by sprintf ("%f") is missing #8842

Closed dsyleixa closed 5 years ago

dsyleixa commented 5 years ago

other than to Arduino Due and ESP8266, for M0 & M4 the floating point formatting by sprintf (str,"%f",fvar) is missing, both for fp32 (float) and for fp64(double).

could that please be fixed by default for all ARM cores?

PS, just to mention: The required Arduino vsprintf implementation must not be limited by INT32_MAX size dimensions for predecimal digits.

dsyleixa commented 5 years ago

no labels yet "feature request" and "platform: ARM" ?

per1234 commented 5 years ago

@dsyleixa I didn't know whether to consider it a feature request or bug report. I've now added the feature request label. As for "platform: ARM", we don't have such a label. We do have an Architecture: SAMD label. I suspect that would be appropriate, bur wasn't sure what you meant by "M4", since Arduino doesn't use a microcontroller with ARM M4 core in any of their boards that I'm aware of.

In the case this is only about Arduino SAMD Boards, then the issue needs to be moved to that repository: https://github.com/arduino/ArduinoCore-samd

dsyleixa commented 5 years ago

tbh, I'm not sure which platform or repo exactly - I have both a M0 Board and a M4 Board by Adafruit, and for both platforms sprintf fails for floats. Actually I consider it to be a bug because of a missing feature (perhaps one may buy for both labels)   ;)

Still gladly looking forward to M4 SAMD51 boards by Arduino, too... 8)

per1234 commented 5 years ago

Moved to https://github.com/arduino/ArduinoCore-samd/issues/407

dsyleixa commented 5 years ago

a pity, again to close an unresolved issue... :-/

per1234 commented 5 years ago

You opened the issue in the appropriate repository, which makes it more likely to be resolved. We only want one open issue per topic, so I closed this one.

dsyleixa commented 5 years ago

I actually didn't move it but I doubled that, to be solved simultaneously in either repo, wherever it is solved faster.

per1234 commented 5 years ago

There is no way to solve the issue in this repository. This repository only contains the Java source code of the Arduino IDE's GUI.