diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2013-06-25 16:13:56 +0200 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2013-06-25 16:13:56 +0200 |
commit | da361cac0dab78954c11a91db61dcad96b8ac85f (patch) | |
tree | eb5045c252de39fdf8a8fc1e56e49c5992051e0f /cores | |
parent | 4b851f7e9c7319502e76214ecd6a658470405dd9 (diff) | |
parent | a7ba61d1b74c01640de5bd28d2c909d3d31ec650 (diff) |
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-discovery
Diffstat (limited to 'cores')
-rw-r--r-- | cores/arduino/WString.cpp | 4 | ||||
-rw-r--r-- | cores/arduino/WString.h | 4 | ||||
-rw-r--r-- | cores/robot/WString.cpp | 4 | ||||
-rw-r--r-- | cores/robot/WString.h | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index 8c85cc5..48c30df 100644 --- a/cores/arduino/WString.cpp +++ b/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, 6, buf); + char* string = dtostrf(num, 8, 2, buf); return concat(string, strlen(string)); } unsigned char String::concat(double num) { char buf[20]; - char* string = dtostrf(num, 8, 6, buf); + char* string = dtostrf(num, 8, 2, buf); return concat(string, strlen(string)); } diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index 44a8419..b3b9f14 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -69,8 +69,8 @@ public: explicit String(unsigned int, unsigned char base=10); explicit String(long, unsigned char base=10); explicit String(unsigned long, unsigned char base=10); - explicit String(float, int decimalPlaces=6); - explicit String(double, int decimalPlaces=6); + explicit String(float, int decimalPlaces=2); + explicit String(double, int decimalPlaces=2); ~String(void); // memory management diff --git a/cores/robot/WString.cpp b/cores/robot/WString.cpp index 8c85cc5..48c30df 100644 --- a/cores/robot/WString.cpp +++ b/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, 6, buf); + char* string = dtostrf(num, 8, 2, buf); return concat(string, strlen(string)); } unsigned char String::concat(double num) { char buf[20]; - char* string = dtostrf(num, 8, 6, buf); + char* string = dtostrf(num, 8, 2, buf); return concat(string, strlen(string)); } diff --git a/cores/robot/WString.h b/cores/robot/WString.h index 4b9e64e..0404f76 100644 --- a/cores/robot/WString.h +++ b/cores/robot/WString.h @@ -69,8 +69,8 @@ public: explicit String(unsigned int, unsigned char base=10); explicit String(long, unsigned char base=10); explicit String(unsigned long, unsigned char base=10); - explicit String(float, int decimalPlaces=6); - explicit String(double, int decimalPlaces=6); + explicit String(float, int decimalPlaces=2); + explicit String(double, int decimalPlaces=2); ~String(void); // memory management |