feat: 增加空间布局配置与运行时节点标识联动
- 为 Rust sensing server 增加空间布局配置入口,支持加载节点位置与语义区域定义,并扩展空间融合解释输出。 - 在 Docker 镜像中打包 config 目录,确保部署后可直接读取 spatial-layout.json。 - 修正 ESP32 显示界面中的节点编号来源,改为使用运行时 NVS 配置而非编译期常量。
This commit is contained in:
parent
2a0f2b1a40
commit
d71c7fbeff
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"nodes": [
|
||||
{
|
||||
"node_id": 1,
|
||||
"label": "node-1",
|
||||
"position": [0.65, 0.6, 0.9]
|
||||
},
|
||||
{
|
||||
"node_id": 2,
|
||||
"label": "node-2",
|
||||
"position": [-0.7, 0.5, 1.23]
|
||||
}
|
||||
],
|
||||
"zones": [
|
||||
{
|
||||
"zone_id": "center",
|
||||
"label": "center",
|
||||
"center": [0.0, 0.0, 1.0],
|
||||
"radius": 0.7
|
||||
},
|
||||
{
|
||||
"zone_id": "entrance",
|
||||
"label": "entrance",
|
||||
"center": [1.0, -0.2, 1.0],
|
||||
"radius": 0.8
|
||||
},
|
||||
{
|
||||
"zone_id": "left-closet",
|
||||
"label": "left closet",
|
||||
"center": [-1.5, -0.5, 1.0],
|
||||
"radius": 0.8
|
||||
},
|
||||
{
|
||||
"zone_id": "behind-closet",
|
||||
"label": "behind closet",
|
||||
"center": [0.0, -1.5, 1.0],
|
||||
"radius": 0.55
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ COPY --from=builder /build/target/release/sensing-server /app/sensing-server
|
|||
|
||||
# Copy UI assets
|
||||
COPY ui/ /app/ui/
|
||||
COPY config/ /app/config/
|
||||
|
||||
# HTTP API
|
||||
EXPOSE 3000
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "display_ui.h"
|
||||
#include "nvs_config.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#if CONFIG_DISPLAY_ENABLE
|
||||
|
|
@ -20,6 +21,7 @@
|
|||
#include "edge_processing.h"
|
||||
|
||||
static const char *TAG = "disp_ui";
|
||||
extern nvs_config_t g_nvs_config;
|
||||
|
||||
/* ---- Theme colors ---- */
|
||||
#define COLOR_BG lv_color_make(0x0A, 0x0A, 0x0F)
|
||||
|
|
@ -347,11 +349,7 @@ void display_ui_update(void)
|
|||
{
|
||||
char buf[48];
|
||||
|
||||
#ifdef CONFIG_CSI_NODE_ID
|
||||
snprintf(buf, sizeof(buf), "Node: %d", CONFIG_CSI_NODE_ID);
|
||||
#else
|
||||
snprintf(buf, sizeof(buf), "Node: --");
|
||||
#endif
|
||||
snprintf(buf, sizeof(buf), "Node: %d", g_nvs_config.node_id);
|
||||
lv_label_set_text(s_sys_node, buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "Heap: %lu KB free",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue