feat: boot-phase OTA, RS485 variant, async melody download, HAL guards
- bootOtaCheck() runs at top of setup() before any task/timer; streams firmware to flash on update, reboots, otherwise returns immediately - New bespoke-rs485-v1 build env + Rs485OutputManager for Waveshare 16CH Modbus RTU relay; vesper.hpp renamed vesper-std.hpp, env renamed accordingly - Player: permanent melodyDownloadTaskFn task; fast path (built-in/SD) before async download; uid accepted as alias for pid - CommunicationRouter: HAS_UART guards throughout so UART transport compiles out when Serial2 is claimed by Modbus - OTAManager: stack 8KB→16KB, pinned to Core 1, HTTPClient recreated per retry, download timeout 30s→60s - FileManager: heap guard before SSL alloc; watchdog log cleanup - ConfigManager: OTA fallback URLs http (no TLS for firmware servers) - agnus.hpp: HAS_UART 1 added - provisioning/nvs_agnus_lab_device.csv added - Version bumped to v2.0.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+42
-6
@@ -54,16 +54,19 @@ lib_deps =
|
||||
; RF remote receiver (433MHz, RCSwitch protocol)
|
||||
sui77/rc-switch @ ^2.6.4
|
||||
|
||||
; Modbus RTU master (used by Rs485OutputManager for bespoke-rs485 build)
|
||||
4-20ma/ModbusMaster @ ^2.0.1
|
||||
|
||||
build_flags_common =
|
||||
-std=gnu++14
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DCONFIG_ASYNC_TCP_RUNNING_CORE=0
|
||||
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
; VESPER v1 — Kincony KC868-A6 (ESP32-D0WD-V3, 4MB Flash)
|
||||
; VESPER Standard v1 — Kincony KC868-A6 (ESP32-D0WD-V3, 4MB Flash)
|
||||
; Current production board
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
[env:vesper-v1]
|
||||
[env:vesper-std-v1]
|
||||
platform = ${common.platform}
|
||||
framework = ${common.framework}
|
||||
board = esp32dev
|
||||
@@ -95,8 +98,8 @@ board_build.cmake_extra_args = -DCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
build_flags =
|
||||
${common.build_flags_common}
|
||||
-DPSRAM_ENABLED=0
|
||||
-DMQTT_SECRET=\"change-me-in-platformio-ini\"
|
||||
-include variants/vesper.hpp
|
||||
-DMQTT_SECRET=\"deea8b2dbf21872bff8b4639ca16d0348358945ccd4c1cb6c5934ba510de1dce\"
|
||||
-include variants/vesper-std.hpp
|
||||
|
||||
lib_deps = ${common.lib_deps}
|
||||
|
||||
@@ -122,7 +125,7 @@ board_build.cmake_extra_args = -DCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
build_flags =
|
||||
${common.build_flags_common}
|
||||
-DPSRAM_ENABLED=0
|
||||
-DMQTT_SECRET=\"change-me-in-platformio-ini\"
|
||||
-DMQTT_SECRET=\"deea8b2dbf21872bff8b4639ca16d0348358945ccd4c1cb6c5934ba510de1dce\"
|
||||
-include variants/agnus.hpp
|
||||
|
||||
lib_deps = ${common.lib_deps}
|
||||
@@ -149,12 +152,45 @@ board_build.cmake_extra_args = -DCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
build_flags =
|
||||
${common.build_flags_common}
|
||||
-DPSRAM_ENABLED=0
|
||||
-DMQTT_SECRET=\"change-me-in-platformio-ini\"
|
||||
-DMQTT_SECRET=\"deea8b2dbf21872bff8b4639ca16d0348358945ccd4c1cb6c5934ba510de1dce\"
|
||||
-include variants/agnus.hpp
|
||||
|
||||
lib_deps = ${common.lib_deps}
|
||||
|
||||
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
; BESPOKE RS485 v1 — Vesper base board + Waveshare 16CH RS485 Modbus RTU relay
|
||||
;
|
||||
; One-off build for a single client requiring 16 outputs. The internal PCF8574
|
||||
; relays on the KC868-A6 are NOT used. All outputs go through the Waveshare board
|
||||
; via UART2 RS485 (GPIO27 TX, GPIO14 RX, MAX13487EESA auto-direction transceiver).
|
||||
;
|
||||
; OTA updates for this device must be built from THIS environment only.
|
||||
; Other environments are unaffected — Rs485OutputManager is dead code for them
|
||||
; since FEATURE_RS485 is not set.
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
[env:bespoke-rs485-v1]
|
||||
platform = ${common.platform}
|
||||
framework = ${common.framework}
|
||||
board = esp32dev
|
||||
|
||||
monitor_speed = ${common.monitor_speed}
|
||||
upload_speed = 921600
|
||||
upload_protocol = esptool
|
||||
|
||||
board_build.partitions = min_spiffs.csv
|
||||
build_unflags = -std=gnu++11
|
||||
board_build.cmake_extra_args = -DCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
|
||||
build_flags =
|
||||
${common.build_flags_common}
|
||||
-DPSRAM_ENABLED=0
|
||||
-DMQTT_SECRET=\"deea8b2dbf21872bff8b4639ca16d0348358945ccd4c1cb6c5934ba510de1dce\"
|
||||
-include variants/bespoke_rs485.hpp
|
||||
|
||||
lib_deps = ${common.lib_deps}
|
||||
|
||||
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
; VESPER+ v1 — Future: adds RF remote support
|
||||
; ───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user