You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dtostrf implementation seems to be missing the leading space padding of the AVR variant. The padding is very helpful when doing things like updating LCDs.
On the 328P the following test code prints ' 17.0105' , and on the ESP8266 it prints '17.0105'.
That's correct. There actually are 4 spaces in there, but it doesn't seem to be displaying properly. If I edit the post, there are indeed 4 spaces in there. The ESP8266 implementation doesn't add the leading spaces.
The dtostrf implementation seems to be missing the leading space padding of the AVR variant. The padding is very helpful when doing things like updating LCDs.
On the 328P the following test code prints ' 17.0105' , and on the ESP8266 it prints '17.0105'.
float input = 17.0105;
char val[12];
void setup() {
Serial.begin(115200);
dtostrf(input, 11, 4, val);
Serial.print("'");
Serial.print(val);
Serial.println("'");
}
void loop() {
}
The text was updated successfully, but these errors were encountered: