feat(01-02): wifi_server.h/.cpp — AsyncUDP listener with FreeRTOS queue

- RawPacket struct carries raw bytes, IP, port from AsyncUDP callback
- xQueueSendFromISR in callback (ISR-safe) — zero JSON parsing in callback
- parseTask runs in separate FreeRTOS task, drains rawQueue, parses JSON
- STATUS command handled immediately in parseTask with UDP response to sender
- commandQueue declared extern for animation engine (Plan 03) to consume
- main.cpp: include wifi_server.h, call startUdpServer() after WIFI_PS_NONE
This commit is contained in:
Claude
2026-04-03 13:25:15 +02:00
parent 3323a87ce0
commit 230be9994e
6 changed files with 402 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
#include "config.h"
#include "led_driver.h"
#include "credentials.h"
#include "wifi_server.h"
// ---------------------------------------------------------------------------
// Color constants for startup indicators
@@ -72,11 +73,14 @@ void setup() {
esp_wifi_set_ps(WIFI_PS_NONE);
Serial.println("WIFI_PS_NONE set — RMT coexistence mode active");
// 6. Print connection info
// 6. Start UDP server (must be after WiFi connect and WIFI_PS_NONE)
startUdpServer();
// 7. Print connection info
Serial.print("WiFi connected: ");
Serial.println(WiFi.localIP().toString());
// 7. WiFi connected indicator: dim white
// 8. WiFi connected indicator: dim white
setAllWand(COLOR_WIFI_READY);
showBothStrips();