forked from bblanchon/ArduinoJson
Added overload to add() to specify the double precision
This commit is contained in:
@ -23,6 +23,11 @@ public:
|
||||
add(JsonValue(value));
|
||||
}
|
||||
|
||||
void add(double value, int digits=2)
|
||||
{
|
||||
add(JsonValue(value, digits));
|
||||
}
|
||||
|
||||
void add(JsonValue value)
|
||||
{
|
||||
if (itemCount >= N) return;
|
||||
|
@ -23,6 +23,11 @@ public:
|
||||
add(key, JsonValue(value));
|
||||
}
|
||||
|
||||
void add(const char* key, double value, int digits=2)
|
||||
{
|
||||
add(key, JsonValue(value, digits));
|
||||
}
|
||||
|
||||
void add(const char* key, JsonValue value)
|
||||
{
|
||||
if (itemCount >= N) return;
|
||||
|
Reference in New Issue
Block a user