From c47e69cfd6806501adb728b704538ca6bfbd4947 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 May 2024 00:13:55 +0000 Subject: [PATCH 1/7] Bump RadioLib to 6.6.0 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 618a34a..8d57959 100644 --- a/platformio.ini +++ b/platformio.ini @@ -26,7 +26,7 @@ lib_deps = knolleary/PubSubClient@^2.8 mikalhart/TinyGPSPlus @ 1.1.0 shaggydog/OneButton @ 1.5.0 - jgromes/RadioLib @ 6.5.0 + jgromes/RadioLib @ 6.6.0 check_tool = cppcheck check_flags = cppcheck: --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction --suppress=shadowFunction:*TimeLib.cpp --suppress=unreadVariable:*TimeLib.cpp --suppress=badBitmaskCheck:*project_configuration.cpp check_skip_packages = yes From 8682e37d35a6cc0c403919475dd6206033431cf9 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 28 Jun 2024 00:13:27 +0000 Subject: [PATCH 2/7] Bump ArduinoJson to 7.1.0 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 8d57959..d4cea93 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,7 @@ lib_ldf_mode = deep+ monitor_speed = 115200 monitor_raw = yes lib_deps = - bblanchon/ArduinoJson @ 7.0.4 + bblanchon/ArduinoJson @ 7.1.0 lewisxhe/AXP202X_Library @ 1.1.3 peterus/APRS-Decoder-Lib @ 0.0.6 peterus/esp-logger @ 1.0.0 From d074febe131dfb77dabc16b4ecf81bf846faceac Mon Sep 17 00:00:00 2001 From: pe-jot Date: Tue, 10 Sep 2024 21:21:03 +0200 Subject: [PATCH 3/7] Use JsonDocument instead of DynamicJsonDocument --- src/ConfigurationManagement/configuration.cpp | 4 ++-- src/ConfigurationManagement/configuration.h | 4 ++-- src/TaskMQTT.cpp | 2 +- src/project_configuration.cpp | 4 ++-- src/project_configuration.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ConfigurationManagement/configuration.cpp b/src/ConfigurationManagement/configuration.cpp index 6eff722..0cdb441 100644 --- a/src/ConfigurationManagement/configuration.cpp +++ b/src/ConfigurationManagement/configuration.cpp @@ -23,7 +23,7 @@ void ConfigurationManagement::readConfiguration(logging::Logger &logger, Configu logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, MODULE_NAME, "Failed to open file for reading, using default configuration."); return; } - DynamicJsonDocument data(2048); + JsonDocument data; DeserializationError error = deserializeJson(data, file); if (error) { logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, MODULE_NAME, "Failed to read file, using default configuration."); @@ -44,7 +44,7 @@ void ConfigurationManagement::writeConfiguration(logging::Logger &logger, Config logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, MODULE_NAME, "Failed to open file for writing..."); return; } - DynamicJsonDocument data(2048); + JsonDocument data; writeProjectConfiguration(conf, data); diff --git a/src/ConfigurationManagement/configuration.h b/src/ConfigurationManagement/configuration.h index 4d988cb..d2b6608 100644 --- a/src/ConfigurationManagement/configuration.h +++ b/src/ConfigurationManagement/configuration.h @@ -22,8 +22,8 @@ class ConfigurationManagement { void writeConfiguration(logging::Logger &logger, Configuration &conf); private: - virtual void readProjectConfiguration(DynamicJsonDocument &data, Configuration &conf) = 0; - virtual void writeProjectConfiguration(Configuration &conf, DynamicJsonDocument &data) = 0; + virtual void readProjectConfiguration(JsonDocument &data, Configuration &conf) = 0; + virtual void writeProjectConfiguration(Configuration &conf, JsonDocument &data) = 0; const String mFilePath; }; diff --git a/src/TaskMQTT.cpp b/src/TaskMQTT.cpp index 1509aca..b6393ba 100644 --- a/src/TaskMQTT.cpp +++ b/src/TaskMQTT.cpp @@ -29,7 +29,7 @@ bool MQTTTask::loop(System &system) { if (!_toMQTT.empty()) { std::shared_ptr msg = _toMQTT.getElement(); - DynamicJsonDocument data(1024); + JsonDocument data; data["source"] = msg->getSource(); data["destination"] = msg->getDestination(); data["path"] = msg->getPath(); diff --git a/src/project_configuration.cpp b/src/project_configuration.cpp index 592b482..d473728 100644 --- a/src/project_configuration.cpp +++ b/src/project_configuration.cpp @@ -4,7 +4,7 @@ #include "project_configuration.h" -void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocument &data, Configuration &conf) { +void ProjectConfigurationManagement::readProjectConfiguration(JsonDocument &data, Configuration &conf) { if (data.containsKey("callsign")) conf.callsign = data["callsign"].as(); @@ -119,7 +119,7 @@ void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocumen conf.board = data["board"].as(); } -void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &conf, DynamicJsonDocument &data) { +void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &conf, JsonDocument &data) { data["callsign"] = conf.callsign; if (!conf.network.DHCP) { diff --git a/src/project_configuration.h b/src/project_configuration.h index de0d383..f153f1b 100644 --- a/src/project_configuration.h +++ b/src/project_configuration.h @@ -176,8 +176,8 @@ class ProjectConfigurationManagement : public ConfigurationManagement { } private: - virtual void readProjectConfiguration(DynamicJsonDocument &data, Configuration &conf) override; - virtual void writeProjectConfiguration(Configuration &conf, DynamicJsonDocument &data) override; + virtual void readProjectConfiguration(JsonDocument &data, Configuration &conf) override; + virtual void writeProjectConfiguration(Configuration &conf, JsonDocument &data) override; }; #endif From 854d025b560ac3f7d317e68f981233f74cb5eb7a Mon Sep 17 00:00:00 2001 From: pe-jot Date: Wed, 11 Sep 2024 17:49:26 +0200 Subject: [PATCH 4/7] Fix deprecated warnings from ArduinoJson library --- src/project_configuration.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/project_configuration.cpp b/src/project_configuration.cpp index d473728..fdee843 100644 --- a/src/project_configuration.cpp +++ b/src/project_configuration.cpp @@ -134,9 +134,9 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co } data["wifi"]["active"] = conf.wifi.active; - JsonArray aps = data["wifi"].createNestedArray("AP"); + JsonArray aps = data["wifi"]["AP"].to(); for (Configuration::Wifi::AP ap : conf.wifi.APs) { - JsonObject v = aps.createNestedObject(); + JsonObject v = aps.add(); v["SSID"] = ap.SSID; v["password"] = ap.password; } @@ -165,9 +165,9 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co data["display"]["overwrite_pin"] = conf.display.overwritePin; data["display"]["turn180"] = conf.display.turn180; data["ftp"]["active"] = conf.ftp.active; - JsonArray users = data["ftp"].createNestedArray("user"); + JsonArray users = data["ftp"]["user"].to(); for (Configuration::Ftp::User u : conf.ftp.users) { - JsonObject v = users.createNestedObject(); + JsonObject v = users.add(); v["name"] = u.name; v["password"] = u.password; } From 7eeb99f02c41ea010385f3922e8520b55b2193bb Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Fri, 13 Sep 2024 09:32:40 +0000 Subject: [PATCH 5/7] fix clang-format --- src/ConfigurationManagement/configuration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConfigurationManagement/configuration.cpp b/src/ConfigurationManagement/configuration.cpp index 0cdb441..53ad575 100644 --- a/src/ConfigurationManagement/configuration.cpp +++ b/src/ConfigurationManagement/configuration.cpp @@ -23,7 +23,7 @@ void ConfigurationManagement::readConfiguration(logging::Logger &logger, Configu logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, MODULE_NAME, "Failed to open file for reading, using default configuration."); return; } - JsonDocument data; + JsonDocument data; DeserializationError error = deserializeJson(data, file); if (error) { logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, MODULE_NAME, "Failed to read file, using default configuration."); From e59e0b02f7199c2757b5d14b7a18cb191556da59 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Fri, 13 Sep 2024 12:13:53 +0000 Subject: [PATCH 6/7] update dependabot --- .github/workflows/dependabot.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 912da5e..2ce9fea 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -12,8 +12,9 @@ jobs: name: run PlatformIO Dependabot steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: run PlatformIO Dependabot uses: peterus/platformio_dependabot@v1 with: - github_token: ${{ secrets.DEPENDABOT_PAT }} + github_token: ${{ secrets.GITHUB_TOKEN }} + assignee: peterus From 25b0e2693d0a624e65d9d86feb1e6cd4d3cbd4f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Sep 2024 12:45:10 +0000 Subject: [PATCH 7/7] Bump espressif32 to 6.8.1 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index d4cea93..7d4e4a1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,7 +12,7 @@ default_envs = lora_board [env] -platform = espressif32 @ 6.7.0 +platform = espressif32 @ 6.8.1 framework = arduino lib_ldf_mode = deep+ monitor_speed = 115200