diff --git a/hardware/arduino/avr/cores/arduino/WString.cpp b/hardware/arduino/avr/cores/arduino/WString.cpp index 48c30df77..db79da41f 100644 --- a/hardware/arduino/avr/cores/arduino/WString.cpp +++ b/hardware/arduino/avr/cores/arduino/WString.cpp @@ -325,14 +325,14 @@ unsigned char String::concat(unsigned long num) unsigned char String::concat(float num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); } unsigned char String::concat(double num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); } diff --git a/hardware/arduino/avr/cores/robot/WString.cpp b/hardware/arduino/avr/cores/robot/WString.cpp index 48c30df77..db79da41f 100644 --- a/hardware/arduino/avr/cores/robot/WString.cpp +++ b/hardware/arduino/avr/cores/robot/WString.cpp @@ -325,14 +325,14 @@ unsigned char String::concat(unsigned long num) unsigned char String::concat(float num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); } unsigned char String::concat(double num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); } diff --git a/hardware/arduino/sam/cores/arduino/WString.cpp b/hardware/arduino/sam/cores/arduino/WString.cpp index d6b344c2a..7b46f05d1 100644 --- a/hardware/arduino/sam/cores/arduino/WString.cpp +++ b/hardware/arduino/sam/cores/arduino/WString.cpp @@ -326,14 +326,14 @@ unsigned char String::concat(unsigned long num) unsigned char String::concat(float num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); } unsigned char String::concat(double num) { char buf[20]; - char* string = dtostrf(num, 8, 2, buf); + char* string = dtostrf(num, 4, 2, buf); return concat(string, strlen(string)); }