mirror of
https://github.com/m5stack/StackChan.git
synced 2026-06-14 18:20:27 +00:00
Merge pull request #21 from Flo5k5/feat/kconfig-server-url
feat(firmware): add CONFIG_STACKCHAN_SERVER_URL Kconfig option
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user