forked from bblanchon/ArduinoJson
Set ARDUINOJSON_USE_DOUBLE
to 0
by default on 8-bit architectures
This commit is contained in:
@ -8,6 +8,7 @@ HEAD
|
||||
* Store 64-bit numbers (`double` and `long long`) in an additional slot
|
||||
* Reduce the slot size (see table below)
|
||||
* Improve message when user forgets third arg of `serializeJson()` et al.
|
||||
* Set `ARDUINOJSON_USE_DOUBLE` to `0` by default on 8-bit architectures
|
||||
|
||||
| Architecture | before | after |
|
||||
|--------------|----------|----------|
|
||||
|
@ -8,7 +8,7 @@ static_assert(ARDUINOJSON_SLOT_ID_SIZE == 1, "ARDUINOJSON_SLOT_ID_SIZE");
|
||||
|
||||
static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
|
||||
|
||||
static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
|
||||
static_assert(ARDUINOJSON_USE_DOUBLE == 0, "ARDUINOJSON_USE_DOUBLE");
|
||||
|
||||
static_assert(sizeof(ArduinoJson::detail::VariantData) == 6,
|
||||
"sizeof(VariantData)");
|
||||
|
@ -56,12 +56,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Store floating-point values with float (0) or double (1)
|
||||
// https://arduinojson.org/v7/config/use_double/
|
||||
#ifndef ARDUINOJSON_USE_DOUBLE
|
||||
# define ARDUINOJSON_USE_DOUBLE 1
|
||||
#endif
|
||||
|
||||
// Pointer size: a heuristic to set sensible defaults
|
||||
#ifndef ARDUINOJSON_SIZEOF_POINTER
|
||||
# if defined(__SIZEOF_POINTER__)
|
||||
@ -73,6 +67,16 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Store floating-point values with float (0) or double (1)
|
||||
// https://arduinojson.org/v7/config/use_double/
|
||||
#ifndef ARDUINOJSON_USE_DOUBLE
|
||||
# if ARDUINOJSON_SIZEOF_POINTER >= 4 // 32 & 64 bits systems
|
||||
# define ARDUINOJSON_USE_DOUBLE 1
|
||||
# else
|
||||
# define ARDUINOJSON_USE_DOUBLE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Store integral values with long (0) or long long (1)
|
||||
// https://arduinojson.org/v7/config/use_long_long/
|
||||
#ifndef ARDUINOJSON_USE_LONG_LONG
|
||||
|
Reference in New Issue
Block a user