pio config cleanup

This commit is contained in:
2025-11-03 17:53:30 +01:00
parent 7697cb4ae9
commit 8196ae4601
5 changed files with 23 additions and 29 deletions

View File

@@ -5,6 +5,7 @@
#include "Arduino.h"
#include <ArduinoJson.h>
#include <HTTPClient.h>
#include <WiFiClient.h>
#include <vector>
#include <Elog.h>
#include <HTTPUpdate.h>

View File

@@ -11,42 +11,39 @@
[platformio]
default_envs = ESP32_INA233, ESP32_INA226
[env:ESP32_INA233]
[env]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
board = esp32dev
framework = arduino
monitor_speed = 115200
; monitor_filters = esp32_exception_decoder
lib_deps =
esp32async/AsyncTCP @ ~3.4.9
esp32async/ESPAsyncWebServer @ ~3.8.1
robtillaart/INA226@ ~0.6.4
bblanchon/ArduinoJson@^6.21.3
x385832/Elog@~2.0.10
INA233
fetchOTA
board_build.partitions = min_spiffs.csv
build_flags = -Wall -Wextra -DUSE_INA226 -fexceptions
[common_esp32_libs]
lib_deps =
esp32async/AsyncTCP @ ~3.4.9
esp32async/ESPAsyncWebServer @ ~3.8.1
robtillaart/INA226@ ~0.6.4
bblanchon/ArduinoJson@^6.21.3
x385832/Elog@~2.0.10
fetchOTA
[env:ESP32_INA233]
extends = common_esp32_libs
lib_deps =
${common_esp32_libs.lib_deps}
INA233
upload_protocol = espota
upload_port = 192.168.5.205
build_flags = -Wall -Wextra -DLOGGING_SPIFFS_DISABLE -DLOGGING_SD_DISABLE -DELOG_SYSLOG_ENABLE -fexceptions
[env:ESP32_INA226]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
board = esp32dev
framework = arduino
monitor_speed = 115200
; monitor_filters = esp32_exception_decoder
extends = common_esp32_libs
lib_deps =
esp32async/AsyncTCP @ ~3.4.9
esp32async/ESPAsyncWebServer @ ~3.8.1
${common_esp32_libs.lib_deps}
robtillaart/INA226@ ~0.6.4
bblanchon/ArduinoJson@^6.21.3
x385832/Elog@~2.0.10
fetchOTA
board_build.partitions = min_spiffs.csv
upload_protocol = espota
upload_port = 192.168.6.45
build_flags = -Wall -Wextra -DUSE_INA226 -DLOGGING_SPIFFS_DISABLE -DLOGGING_SD_DISABLE -DELOG_SYSLOG_ENABLE -fexceptions
[env:native]
platform = native

View File

@@ -7,7 +7,7 @@
#define water_level_min_key "water_level_min"
#define water_level_max_key "water_level_max"
#define water_volume_key "water_volume"
#define current_software_version Version{1, 3, 0}
#define current_software_version Version{2, 0, 0}
#define REQUIRED_SPIFFS_VERSION Version{8, 0, 0}
#define RESISTOR_VALUE 4

View File

@@ -203,10 +203,6 @@ void setup()
xTaskCreate(ethernet_task, "EthernetTask", 4096, NULL, 1, NULL);
xTaskCreate(wifi_task, "WiFiTask", 10000, NULL, 1, NULL);
esp_netif_t* eth = esp_netif_get_handle_from_ifkey("ETH_DEF");
esp_netif_t* wifi = esp_netif_get_handle_from_ifkey("WIFI_STA_DEF");
if (ETH.linkUp()){
LOG(ELOG_LEVEL_DEBUG, "Ethernet connected, starting update checker");
xTaskCreate(check_update_task, "CheckUpdateTask", 1024 * 8, NULL, 1, NULL);

View File

@@ -65,9 +65,9 @@ void check_update_task(void* parameter) {
ota_status.current_version = current_software_version;
ota_status.update_progress = -1;
#ifdef USE_INA226
OTA ota("https://iot.tobiasmaier.me/firmware/waterlevel", current_software_version, "INA226");
OTA ota("https://iot.tobiasmaier.me/firmware/waterlevel", current_software_version, "INA226REV2");
#else
OTA ota("https://iot.tobiasmaier.me/firmware/waterlevel", current_software_version, "INA233");
OTA ota("https://iot.tobiasmaier.me/firmware/waterlevel", current_software_version, "INA233REV2");
#endif
OTA spiffs_fs("https://iot.tobiasmaier.me/filesystem/waterlevel", REQUIRED_SPIFFS_VERSION, "generic");