Browse Source

Change the default of `ARDUINOJSON_USE_DOUBLE` to `1`

Benoit Blanchon 4 năm trước cách đây
mục cha
commit
7764515f56

+ 1 - 0
CHANGELOG.md

@@ -6,6 +6,7 @@ HEAD
 
 * Remove `ARDUINOJSON_EMBEDDED_MODE` and assume we run on an embedded platform.  
   Dependent settings (like `ARDUINOJSON_DEFAULT_NESTING_LIMIT`) must be set individually.
+* Change the default of `ARDUINOJSON_USE_DOUBLE` to `1`
 
 v6.18.5 (2021-09-28)
 -------

+ 1 - 1
extras/conf_test/avr.cpp

@@ -7,7 +7,7 @@ static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 1,
 
 static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
 
-static_assert(ARDUINOJSON_USE_DOUBLE == 0, "ARDUINOJSON_USE_DOUBLE");
+static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
 
 static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 8,
               "sizeof(VariantSlot)");

+ 1 - 1
extras/conf_test/esp8266.cpp

@@ -7,7 +7,7 @@ static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 2,
 
 static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
 
-static_assert(ARDUINOJSON_USE_DOUBLE == 0, "ARDUINOJSON_USE_DOUBLE");
+static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
 
 static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 16,
               "sizeof(VariantSlot)");

+ 1 - 1
src/ArduinoJson/Configuration.hpp

@@ -78,7 +78,7 @@
 
 // Store floating-point values with float (0) or double (1)
 #ifndef ARDUINOJSON_USE_DOUBLE
-#  define ARDUINOJSON_USE_DOUBLE 0
+#  define ARDUINOJSON_USE_DOUBLE 1
 #endif
 
 // Store integral values with long (0) or long long (1)