diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index dbe9da57..17330753 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -2,11 +2,22 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(PROJECT_VER "1.4.1") +set(PROJECT_VER "1.5.1") add_definitions(-DFIRMWARE_VERSION=\"${PROJECT_VER}\") # Add this line to disable the specific warning add_compile_options(-Wno-missing-field-initializers) +# Auto-load a local sdkconfig overlay (git-ignored) when present. Lets +# self-hosted / custom deployments pin CONFIG_STACKCHAN_SERVER_URL, +# CONFIG_OTA_URL, etc. without touching committed defaults. +# Manual equivalent: SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.local" idf.py build +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig.defaults.local") + set(SDKCONFIG_DEFAULTS + "${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig.defaults;${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig.defaults.local" + CACHE STRING "ESP-IDF sdkconfig default files (auto-extended with local overlay)" FORCE) + message(STATUS "StackChan: detected sdkconfig.defaults.local, applying overlay") +endif() + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(stack-chan) diff --git a/firmware/README.md b/firmware/README.md index ffc20f2f..20a73bf6 100644 --- a/firmware/README.md +++ b/firmware/README.md @@ -17,6 +17,16 @@ python3 ./fetch_repos.py idf.py build ``` +### Host-side tests + +The motion coordinate helpers can be tested without ESP-IDF hardware: + +```bash +cmake -S tests -B build-host-tests +cmake --build build-host-tests +ctest --test-dir build-host-tests --output-on-failure +``` + ### Flash ```bash diff --git a/firmware/main/Kconfig.projbuild b/firmware/main/Kconfig.projbuild index 304e48d8..89592a0c 100644 --- a/firmware/main/Kconfig.projbuild +++ b/firmware/main/Kconfig.projbuild @@ -1,3 +1,16 @@ +menu "StackChan Server" + +config STACKCHAN_SERVER_URL + string "StackChan server base URL" + default "http://47.113.125.164:12800" + help + Base URL (scheme + host + port, no trailing slash) of the StackChan backend. + The HAL composes endpoint paths like /stackChan/device/user, + /stackChan/apps and /stackChan/ws from this base. Override in your + sdkconfig.defaults.local to point at a self-hosted deployment. + +endmenu + menu "Xiaozhi Assistant" config OTA_URL diff --git a/firmware/main/apps/app_setup/workers/ai_agent.cpp b/firmware/main/apps/app_setup/workers/ai_agent.cpp index 1b0710aa..3f713d95 100644 --- a/firmware/main/apps/app_setup/workers/ai_agent.cpp +++ b/firmware/main/apps/app_setup/workers/ai_agent.cpp @@ -207,9 +207,36 @@ XiaozhiGeneralWorker::XiaozhiGeneralWorker() _slider_idle_motion->setValue(current_index); _slider_idle_motion->onValueChanged().connect([this](int32_t value) { _pending_idle_motion_index = value; }); + _panel_startup = std::make_unique(_panel->get()); + _panel_startup->setSize(296, 120); + _panel_startup->align(LV_ALIGN_TOP_MID, 0, 196); + _panel_startup->setBgColor(lv_color_hex(0xD2E3FF)); + _panel_startup->setBorderWidth(0); + _panel_startup->setRadius(18); + _panel_startup->setPadding(0, 0, 0, 0); + _panel_startup->removeFlag(LV_OBJ_FLAG_SCROLLABLE); + + _label_startup_title = std::make_unique