forked from bblanchon/ArduinoJson
Can now set the double value precision.
This commit is contained in:
1 parent
2222714d68
commit
81c7b9f700
4 files changed
+35
-33
No files matched your search
@@ -22,7 +22,7 @@ size_t Print::write(const char* s)
|
||||
size_t Print::print(double value, int digits)
|
||||
{
|
||||
char tmp[32];
|
||||
sprintf(tmp, "%.*lg", digits, value);
|
||||
sprintf(tmp, "%.*lg", digits+1, value);
|
||||
return write(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user