735aaed648
CI / platformio (pull_request) Failing after 4m36s
Add cmd_exec.c / cmd_exec.h providing cmd_exec_handle() — a tolerant
cJSON-based dispatcher for structured ESP-NOW CMD frames per the D5
wire contract ({"op":"<verb>","a":{<args>}}, ≤200 bytes).
Supported ops (all logged):
screen — renders title/subtitle/symbol on an LVGL full-screen
overlay via bsp_display_lock; "pulse"/"flash" effect
tints the background blue.
play — logs the path + loop flag, emits an 880 Hz beep via
audio_play_tone() (no media_manager on box3_voice).
evt — logs event name (card→master direction, unusual here).
led — logs pattern (stub, no LED ring on box3_voice).
unknown — ESP_LOGW + ESP_ERR_NOT_SUPPORTED, no crash.
Wire-up in main.c:
on_mesh_text() callback installed via scenario_mesh_set_text_cb()
immediately after scenario_mesh_init(). Every SCENARIO_MESH_TEXT_CMD
frame is decoded and dispatched; EVT frames are logged and ignored.
cmd_exec.c added to CMakeLists.txt SRCS.
Channel fix in sdkconfig.defaults:
Document that CONFIG_ZACUS_WIFI_CHANNEL must match the master's
connected WiFi channel (lab: ch11) for ESP-NOW co-channel operation.
Tested on hardware (BOX-3 MAC 90:e5:b1:cc:05:f8, /dev/cu.usbmodem11301):
- Build: 2104/2104 targets, 0 errors, 0 warnings on new files.
- Flash: idf.py -p /dev/cu.usbmodem11301 flash — Done.
- Serial proof:
I (10115) zacus-voice: ESP-NOW CMD executor registered (op: screen/play/evt/led)
I (10115) cmd_exec: CMD op=screen t="ZACUS" u="" y="LA" e="pulse"
I (13327) cmd_exec: CMD op=play path="/spiffs/ambiance.wav" loop=0 (beep fallback)
W (16497) cmd_exec: CMD op="explode" unknown — ignored
All three via POST /game/espnow/cmd on master ({"ok":true,"status":"ESP_OK"}).
71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
# Target: ESP32-S3
|
|
CONFIG_IDF_TARGET="esp32s3"
|
|
|
|
# Flash: 16MB
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
|
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
|
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
|
|
|
# Partition table
|
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
|
|
|
# PSRAM: Octal 8MB
|
|
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
|
|
CONFIG_SPIRAM_MODE_OCT=y
|
|
CONFIG_SPIRAM_SPEED_80M=y
|
|
CONFIG_SPIRAM_BOOT_INIT=y
|
|
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y
|
|
|
|
# ESP-SR: WakeNet + MultiNet
|
|
CONFIG_ESP_SR_WAKENET_ENABLE=y
|
|
CONFIG_ESP_SR_WAKENET9_HIESP=y
|
|
CONFIG_ESP_SR_MULTINET_ENABLE=y
|
|
|
|
# WiFi
|
|
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
|
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64
|
|
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64
|
|
|
|
# FreeRTOS
|
|
CONFIG_FREERTOS_HZ=1000
|
|
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
|
|
|
# Logging
|
|
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
|
|
|
# Watchdog: extend for model loading
|
|
CONFIG_ESP_TASK_WDT_TIMEOUT_S=30
|
|
|
|
# Enable HTTPS / TLS for voice bridge
|
|
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
|
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
|
|
|
|
# Heap: place large buffers in PSRAM
|
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
|
|
|
|
# WiFi credentials — set via `idf.py menuconfig` (Zacus BOX-3 Voice
|
|
# Configuration) or via a local sdkconfig override that is NOT committed.
|
|
# Defaults stay empty so credentials never land in git.
|
|
# CONFIG_ZACUS_WIFI_SSID="..."
|
|
# CONFIG_ZACUS_WIFI_PASSWORD="..."
|
|
|
|
# WiFi channel: must match the master ESP32's connected channel for ESP-NOW
|
|
# co-channel operation. The master (idf_zacus) connects to channel 11 on the
|
|
# lab multi-AP "Les cils" network. Set to 0 to scan all channels and connect
|
|
# to whichever AP responds first (may differ from master → ESP-NOW will break).
|
|
# CONFIG_ZACUS_WIFI_CHANNEL=11
|
|
|
|
# esp-box BSP uses the legacy i2c driver; esp_codec_dev uses driver_ng.
|
|
# Force-enable legacy mode so both coexist (and prevent the runtime abort
|
|
# in bsp_display_start when both drivers race to register on the same bus).
|
|
CONFIG_I2C_ENABLE_LEGACY_DRIVERS=y
|
|
|
|
# PLIP phone UI fonts (plip_ui.c)
|
|
CONFIG_LV_FONT_MONTSERRAT_24=y
|
|
CONFIG_LV_FONT_MONTSERRAT_48=y
|
|
|
|
# Stimulus generator (QR display for the master camera, melody for its mic)
|
|
CONFIG_LV_USE_QRCODE=y
|