Merge pull request #21 from Flo5k5/feat/kconfig-server-url

feat(firmware): add CONFIG_STACKCHAN_SERVER_URL Kconfig option
This commit is contained in:
Forairaaaaa
2026-06-03 17:52:27 +08:00
committed by GitHub
2 changed files with 18 additions and 0 deletions
+13
View File
@@ -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
@@ -4,12 +4,17 @@
* SPDX-License-Identifier: MIT
*/
#include "secret_logic.h"
#include <sdkconfig.h>
namespace secret_logic {
__attribute__((weak)) std::string get_server_url()
{
#ifdef CONFIG_STACKCHAN_SERVER_URL
return CONFIG_STACKCHAN_SERVER_URL;
#else
return "http://localhost:3000";
#endif
}
__attribute__((weak)) std::string generate_auth_token()