refactor(comms): clean up Communication folder structure
- Delete dead code: CommandHandler (700-line God Class) and
HTTPRequestHandler — both replaced by new architecture in Stage 4
- Create Drivers/ group for the three low-level protocol drivers,
mirroring the Transport/ pattern:
MQTTAsyncClient → Drivers/MQTTDriver (class: MQTTDriver)
WebSocketServer → Drivers/WebSocketDriver (class: WebSocketDriver)
UARTCommandHandler → Drivers/UARTDriver (class: UARTDriver)
- Update all includes and type references across CommunicationRouter,
all three Transport wrappers, and MQTTHandler
- Add -std=gnu++14 + build_unflags to platformio.ini so std::make_unique
compiles on ESP32 (required by CommunicationRouter::registerHandlers)
Build: passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ lib_deps =
|
||||
https://github.com/marvinroger/async-mqtt-client.git
|
||||
|
||||
build_flags_common =
|
||||
-std=gnu++14
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DCONFIG_ASYNC_TCP_RUNNING_CORE=0
|
||||
|
||||
@@ -70,6 +71,9 @@ upload_protocol = esptool
|
||||
; min_spiffs.csv: ~1.8MB app + ~1.8MB OTA + 64KB NVS + 128KB SPIFFS
|
||||
board_build.partitions = min_spiffs.csv
|
||||
|
||||
; Upgrade to C++14 so std::make_unique is available
|
||||
build_unflags = -std=gnu++11
|
||||
|
||||
; FreeRTOS timer service task stack — default 2048 is too small when timer callbacks
|
||||
; do LOG formatting, MQTT connect(), NTP sync, etc. Increase to 4096.
|
||||
board_build.cmake_extra_args = -DCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
|
||||
Reference in New Issue
Block a user