mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Use float instead of double to reduce the size of JsonVariant (issue #134)
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include "../Arduino/Print.hpp"
|
||||
#include "Encoding.hpp"
|
||||
#include "ForceInline.hpp"
|
||||
#include "JsonFloat.hpp"
|
||||
#include "JsonInteger.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
@@ -60,9 +62,9 @@ class JsonWriter {
|
||||
}
|
||||
}
|
||||
|
||||
void writeLong(long value) { _length += _sink.print(value); }
|
||||
void writeInteger(JsonInteger value) { _length += _sink.print(value); }
|
||||
|
||||
void writeDouble(double value, uint8_t decimals) {
|
||||
void writeFloat(JsonFloat value, uint8_t decimals) {
|
||||
_length += _sink.print(value, decimals);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user