Print "ovf" if float to be printed doesn't fit in a long.
http://code.google.com/p/arduino/issues/detail?id=967
This commit is contained in:
parent
2ef2f9d5c7
commit
e77ee2903b
|
@ -228,6 +228,8 @@ size_t Print::printFloat(double number, uint8_t digits)
|
|||
|
||||
if (isnan(number)) return print("nan");
|
||||
if (isinf(number)) return print("inf");
|
||||
if (number > 4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (number <-4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
|
|
Loading…
Reference in New Issue