From 0fd612955da80559d14b61c592d4273e8661517d Mon Sep 17 00:00:00 2001
From: Francois <thiebolt@irit.fr>
Date: Fri, 1 Mar 2024 19:39:28 +0100
Subject: [PATCH] update

---
 ChangeLog.txt                                 | 11 ++++---
 neosensor/libraries/ArduinoJson/CHANGELOG.md  |  7 +++++
 .../libraries/ArduinoJson/CMakeLists.txt      |  2 +-
 neosensor/libraries/ArduinoJson/README.md     |  6 ++--
 neosensor/libraries/ArduinoJson/appveyor.yml  |  2 +-
 .../ArduinoJson/extras/ci/particle.sh         |  0
 .../extras/scripts/build-arduino-package.sh   |  0
 .../extras/scripts/build-single-header.sh     |  0
 .../extras/scripts/get-release-body.sh        |  0
 .../extras/scripts/get-release-page.sh        |  0
 .../scripts/publish-particle-library.sh       |  0
 .../ArduinoJson/extras/scripts/publish.sh     |  0
 .../extras/scripts/wandbox/publish.sh         |  0
 .../extras/tests/JsonVariant/types.cpp        |  7 +++++
 .../libraries/ArduinoJson/idf_component.yml   |  2 +-
 neosensor/libraries/ArduinoJson/library.json  | 10 +++---
 .../libraries/ArduinoJson/library.properties  |  2 +-
 .../src/ArduinoJson/Variant/VariantImpl.hpp   | 31 +++++++++++++++++++
 .../ArduinoJson/Variant/VariantRefBase.hpp    | 20 +++---------
 .../ArduinoJson/src/ArduinoJson/version.hpp   |  6 ++--
 neosensor/libraries/boards/neosensor.h        |  2 +-
 neosensor/neosensor.ino                       |  8 ++---
 22 files changed, 75 insertions(+), 41 deletions(-)
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/ci/particle.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/build-arduino-package.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/build-single-header.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/get-release-body.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/get-release-page.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/publish-particle-library.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/publish.sh
 mode change 100644 => 100755 neosensor/libraries/ArduinoJson/extras/scripts/wandbox/publish.sh

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 942ecf24..324ccb7c 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -20,13 +20,16 @@ Note 'validation mode': ensure to already have the whole neOSensor configuration
     Roughly seaking, 'validation' mode is just about displaying the 'sharedRoot' json on serial link
     The 'sharedRoot' structure holds all of the sensors values our neOSensor features.
 
-=== Release 231216 for esp32 only (Arduino Core ESP32 2.0.14) /
-feature-calibration
-Note: the calibration itself is not yet available (upcoming release)
+=== Release 240301 for esp32 only (Arduino Core ESP32 2.0.14)
+We kept changed the three defaults NTP servers as global ones.
+We kept the ability to fetch ONE NTP server from DHCP answer.
+
+
+=== Release 231216 for esp32 only (Arduino Core ESP32 2.0.14)
 Bumps to esp32 2.0.14
 Kept esp8266 3.1.2
 - set support for ONYL ONE NTP server (we do not manage anymore the three NTP
-servers support)
+servers support from DHCP)
 
 
 === Release 231027 for esp32 only (Arduino Core ESP32 2.0.11)
diff --git a/neosensor/libraries/ArduinoJson/CHANGELOG.md b/neosensor/libraries/ArduinoJson/CHANGELOG.md
index 477e6fda..2f47083a 100644
--- a/neosensor/libraries/ArduinoJson/CHANGELOG.md
+++ b/neosensor/libraries/ArduinoJson/CHANGELOG.md
@@ -1,6 +1,13 @@
 ArduinoJson: change log
 =======================
 
+v6.21.5 (2024-01-10)
+-------
+
+* Fix warning `function returns incomplete class type` on IAR (issue #2001)
+* Fix `volatile bool` serialized as `1` or `0` instead of `true` or `false` (issue #2029)
+* Remove unused files in the PlatformIO package
+
 v6.21.4 (2023-12-07)
 -------
 
diff --git a/neosensor/libraries/ArduinoJson/CMakeLists.txt b/neosensor/libraries/ArduinoJson/CMakeLists.txt
index e1330235..71b3d535 100644
--- a/neosensor/libraries/ArduinoJson/CMakeLists.txt
+++ b/neosensor/libraries/ArduinoJson/CMakeLists.txt
@@ -10,7 +10,7 @@ if(ESP_PLATFORM)
 	return()
 endif()
 
-project(ArduinoJson VERSION 6.21.4)
+project(ArduinoJson VERSION 6.21.5)
 
 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
 	include(CTest)
diff --git a/neosensor/libraries/ArduinoJson/README.md b/neosensor/libraries/ArduinoJson/README.md
index 42e9bf7f..96879e01 100644
--- a/neosensor/libraries/ArduinoJson/README.md
+++ b/neosensor/libraries/ArduinoJson/README.md
@@ -8,9 +8,9 @@
 [![Continuous Integration](https://ci.appveyor.com/api/projects/status/m7s53wav1l0abssg/branch/6.x?svg=true)](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x)
 [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/arduinojson.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
 [![Coveralls branch](https://img.shields.io/coveralls/github/bblanchon/ArduinoJson/6.x?logo=coveralls)](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)  
-[![Arduino Library Manager](https://img.shields.io/static/v1?label=Arduino&message=v6.21.4&logo=arduino&logoColor=white&color=blue)](https://www.ardu-badge.com/ArduinoJson/6.21.4)
-[![PlatformIO Registry](https://badges.registry.platformio.org/packages/bblanchon/library/ArduinoJson.svg?version=6.21.4)](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.21.4) 
-[![ESP IDF](https://img.shields.io/static/v1?label=ESP+IDF&message=v6.21.4&logo=cpu&logoColor=white&color=blue)](https://components.espressif.com/components/bblanchon/arduinojson)  
+[![Arduino Library Manager](https://img.shields.io/static/v1?label=Arduino&message=v6.21.5&logo=arduino&logoColor=white&color=blue)](https://www.ardu-badge.com/ArduinoJson/6.21.5)
+[![PlatformIO Registry](https://badges.registry.platformio.org/packages/bblanchon/library/ArduinoJson.svg?version=6.21.5)](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.21.5) 
+[![ESP IDF](https://img.shields.io/static/v1?label=ESP+IDF&message=v6.21.5&logo=cpu&logoColor=white&color=blue)](https://components.espressif.com/components/bblanchon/arduinojson)  
 [![GitHub stars](https://img.shields.io/github/stars/bblanchon/ArduinoJson?style=flat&logo=github&color=orange)](https://github.com/bblanchon/ArduinoJson/stargazers)
 [![GitHub Sponsors](https://img.shields.io/github/sponsors/bblanchon?logo=github&color=orange)](https://github.com/sponsors/bblanchon)
 
diff --git a/neosensor/libraries/ArduinoJson/appveyor.yml b/neosensor/libraries/ArduinoJson/appveyor.yml
index eb6d7bdd..8a6a332b 100644
--- a/neosensor/libraries/ArduinoJson/appveyor.yml
+++ b/neosensor/libraries/ArduinoJson/appveyor.yml
@@ -1,4 +1,4 @@
-version: 6.21.4.{build}
+version: 6.21.5.{build}
 environment:
   matrix:
     - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
diff --git a/neosensor/libraries/ArduinoJson/extras/ci/particle.sh b/neosensor/libraries/ArduinoJson/extras/ci/particle.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/build-arduino-package.sh b/neosensor/libraries/ArduinoJson/extras/scripts/build-arduino-package.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/build-single-header.sh b/neosensor/libraries/ArduinoJson/extras/scripts/build-single-header.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/get-release-body.sh b/neosensor/libraries/ArduinoJson/extras/scripts/get-release-body.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/get-release-page.sh b/neosensor/libraries/ArduinoJson/extras/scripts/get-release-page.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/publish-particle-library.sh b/neosensor/libraries/ArduinoJson/extras/scripts/publish-particle-library.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/publish.sh b/neosensor/libraries/ArduinoJson/extras/scripts/publish.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/scripts/wandbox/publish.sh b/neosensor/libraries/ArduinoJson/extras/scripts/wandbox/publish.sh
old mode 100644
new mode 100755
diff --git a/neosensor/libraries/ArduinoJson/extras/tests/JsonVariant/types.cpp b/neosensor/libraries/ArduinoJson/extras/tests/JsonVariant/types.cpp
index 42242991..91b4c1e2 100644
--- a/neosensor/libraries/ArduinoJson/extras/tests/JsonVariant/types.cpp
+++ b/neosensor/libraries/ArduinoJson/extras/tests/JsonVariant/types.cpp
@@ -140,6 +140,13 @@ TEST_CASE("volatile") {
   DynamicJsonDocument doc(4096);
   JsonVariant variant = doc.to<JsonVariant>();
 
+  SECTION("volatile bool") {  // issue #2029
+    volatile bool f = true;
+    variant.set(f);
+    CHECK(variant.is<bool>() == true);
+    CHECK(variant.as<bool>() == true);
+  }
+
   SECTION("volatile int") {
     volatile int f = 42;
     variant.set(f);
diff --git a/neosensor/libraries/ArduinoJson/idf_component.yml b/neosensor/libraries/ArduinoJson/idf_component.yml
index 823d237d..afc8b8a8 100644
--- a/neosensor/libraries/ArduinoJson/idf_component.yml
+++ b/neosensor/libraries/ArduinoJson/idf_component.yml
@@ -1,4 +1,4 @@
-version: "6.21.4"
+version: "6.21.5"
 description: >-
   A simple and efficient JSON library for embedded C++.
   ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ fixed allocation, ✔ zero-copy, ✔ streams, ✔ filtering, and more.
diff --git a/neosensor/libraries/ArduinoJson/library.json b/neosensor/libraries/ArduinoJson/library.json
index 6d235477..0303e99d 100644
--- a/neosensor/libraries/ArduinoJson/library.json
+++ b/neosensor/libraries/ArduinoJson/library.json
@@ -7,16 +7,14 @@
     "type": "git",
     "url": "https://github.com/bblanchon/ArduinoJson.git"
   },
-  "version": "6.21.4",
+  "version": "6.21.5",
   "authors": {
     "name": "Benoit Blanchon",
     "url": "https://blog.benoitblanchon.fr"
   },
-  "exclude": [
-    ".devcontainer",
-    ".github",
-    "extras"
-  ],
+  "export": {
+    "include": ["src", "examples", "LICENSE.txt", "ArduinoJson.h"]
+  },
   "frameworks": "*",
   "platforms": "*",
   "build": {
diff --git a/neosensor/libraries/ArduinoJson/library.properties b/neosensor/libraries/ArduinoJson/library.properties
index b3dfb40e..aa6de9a9 100644
--- a/neosensor/libraries/ArduinoJson/library.properties
+++ b/neosensor/libraries/ArduinoJson/library.properties
@@ -1,5 +1,5 @@
 name=ArduinoJson
-version=6.21.4
+version=6.21.5
 author=Benoit Blanchon <blog.benoitblanchon.fr>
 maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
 sentence=A simple and efficient JSON library for embedded C++.
diff --git a/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantImpl.hpp b/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantImpl.hpp
index c122a2f4..abeed0dc 100644
--- a/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantImpl.hpp
+++ b/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantImpl.hpp
@@ -110,6 +110,13 @@ inline JsonVariant VariantRefBase<TDerived>::add() const {
                      variantAddElement(getOrCreateData(), getPool()));
 }
 
+template <typename TDerived>
+template <typename T>
+inline typename enable_if<ConverterNeedsWriteableRef<T>::value, T>::type
+VariantRefBase<TDerived>::as() const {
+  return Converter<T>::fromJson(getVariant());
+}
+
 template <typename TDerived>
 inline JsonVariant VariantRefBase<TDerived>::getVariant() const {
   return JsonVariant(getPool(), getData());
@@ -120,6 +127,30 @@ inline JsonVariant VariantRefBase<TDerived>::getOrCreateVariant() const {
   return JsonVariant(getPool(), getOrCreateData());
 }
 
+template <typename TDerived>
+template <typename T>
+inline typename enable_if<ConverterNeedsWriteableRef<T>::value, bool>::type
+VariantRefBase<TDerived>::is() const {
+  return Converter<T>::checkJson(getVariant());
+}
+
+template <typename TDerived>
+template <typename T>
+inline bool VariantRefBase<TDerived>::set(const T& value) const {
+  Converter<typename detail::remove_cv<T>::type>::toJson(value,
+                                                         getOrCreateVariant());
+  MemoryPool* pool = getPool();
+  return pool && !pool->overflowed();
+}
+
+template <typename TDerived>
+template <typename T>
+inline bool VariantRefBase<TDerived>::set(T* value) const {
+  Converter<T*>::toJson(value, getOrCreateVariant());
+  MemoryPool* pool = getPool();
+  return pool && !pool->overflowed();
+}
+
 template <typename TDerived>
 template <typename T>
 inline typename enable_if<is_same<T, JsonArray>::value, JsonArray>::type
diff --git a/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp b/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp
index 321aca09..3f29608a 100644
--- a/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp
+++ b/neosensor/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp
@@ -57,9 +57,7 @@ class VariantRefBase : public VariantTag {
   // https://arduinojson.org/v6/api/jsonvariant/as/
   template <typename T>
   FORCE_INLINE typename enable_if<ConverterNeedsWriteableRef<T>::value, T>::type
-  as() const {
-    return Converter<T>::fromJson(getVariant());
-  }
+  as() const;
 
   template <typename T,
             typename = typename enable_if<!is_same<T, TDerived>::value>::type>
@@ -92,9 +90,7 @@ class VariantRefBase : public VariantTag {
   template <typename T>
   FORCE_INLINE
       typename enable_if<ConverterNeedsWriteableRef<T>::value, bool>::type
-      is() const {
-    return Converter<T>::checkJson(getVariant());
-  }
+      is() const;
 
   // Returns true if the value is of the specified type.
   // https://arduinojson.org/v6/api/jsonvariant/is/
@@ -123,20 +119,12 @@ class VariantRefBase : public VariantTag {
   // Copies the specified value.
   // https://arduinojson.org/v6/api/jsonvariant/set/
   template <typename T>
-  FORCE_INLINE bool set(const T& value) const {
-    Converter<T>::toJson(value, getOrCreateVariant());
-    MemoryPool* pool = getPool();
-    return pool && !pool->overflowed();
-  }
+  FORCE_INLINE bool set(const T& value) const;
 
   // Copies the specified value.
   // https://arduinojson.org/v6/api/jsonvariant/set/
   template <typename T>
-  FORCE_INLINE bool set(T* value) const {
-    Converter<T*>::toJson(value, getOrCreateVariant());
-    MemoryPool* pool = getPool();
-    return pool && !pool->overflowed();
-  }
+  FORCE_INLINE bool set(T* value) const;
 
   // Returns the size of the array or object.
   // https://arduinojson.org/v6/api/jsonvariant/size/
diff --git a/neosensor/libraries/ArduinoJson/src/ArduinoJson/version.hpp b/neosensor/libraries/ArduinoJson/src/ArduinoJson/version.hpp
index d0c30aad..160980e9 100644
--- a/neosensor/libraries/ArduinoJson/src/ArduinoJson/version.hpp
+++ b/neosensor/libraries/ArduinoJson/src/ArduinoJson/version.hpp
@@ -4,8 +4,8 @@
 
 #pragma once
 
-#define ARDUINOJSON_VERSION "6.21.4"
+#define ARDUINOJSON_VERSION "6.21.5"
 #define ARDUINOJSON_VERSION_MAJOR 6
 #define ARDUINOJSON_VERSION_MINOR 21
-#define ARDUINOJSON_VERSION_REVISION 4
-#define ARDUINOJSON_VERSION_MACRO V6214
+#define ARDUINOJSON_VERSION_REVISION 5
+#define ARDUINOJSON_VERSION_MACRO V6215
diff --git a/neosensor/libraries/boards/neosensor.h b/neosensor/libraries/boards/neosensor.h
index 3c008c1b..e5a1a0d8 100644
--- a/neosensor/libraries/boards/neosensor.h
+++ b/neosensor/libraries/boards/neosensor.h
@@ -44,7 +44,7 @@
  */
 #define BOARD_NAME          "neOSensor"
 #define BOARD_REVISION      1.2
-#define BOARD_FWREV         231216          // Firmware revision <year><month><day> in 2 digits each
+#define BOARD_FWREV         240301          // Firmware revision <year><month><day> in 2 digits each
 
 
 
diff --git a/neosensor/neosensor.ino b/neosensor/neosensor.ino
index 05a015e5..f063bd51 100644
--- a/neosensor/neosensor.ino
+++ b/neosensor/neosensor.ino
@@ -152,10 +152,10 @@
  *  and vice-versa ... hence leading to numerous DNS failures !
  */
 #define NTP_DEFAULT_SERVER1       "pool.ntp.org"      // DNS location aware
-//#define NTP_DEFAULT_SERVER1       "time.nist.gov"     // DNS location aware
-//#define NTP_DEFAULT_SERVER2       "0.fr.pool.ntp.org" // DNS location aware
-#define NTP_DEFAULT_SERVER2       "ntp.irit.fr"       // UT3-IRIT specific
-#define NTP_DEFAULT_SERVER3       "ntp.univ-tlse3.fr" // UT3 specific
+#define NTP_DEFAULT_SERVER2       "time.nist.gov"     // DNS location aware
+#define NTP_DEFAULT_SERVER3       "0.fr.pool.ntp.org" // DNS location aware
+//#define NTP_DEFAULT_SERVER2       "ntp.irit.fr"       // UT3-IRIT specific
+//#define NTP_DEFAULT_SERVER3       "ntp.univ-tlse3.fr" // UT3 specific
 
 
 /*
-- 
GitLab