From 6f876968a9726661550a9478be827dce1a89b23c Mon Sep 17 00:00:00 2001
From: ywb <347742090@qq.com>
Date: Sun, 17 May 2026 22:32:53 +0800
Subject: [PATCH] debug: add console.log in refreshNavStatus to trace nav2
state
---
agv_app/setting.html | 2 +-
agv_app/static/js/setting.js | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/agv_app/setting.html b/agv_app/setting.html
index a3c88ed..c500d00 100644
--- a/agv_app/setting.html
+++ b/agv_app/setting.html
@@ -12,7 +12,7 @@
⚙️ 系统设置
diff --git a/agv_app/static/js/setting.js b/agv_app/static/js/setting.js
index 89d0837..e4e891f 100644
--- a/agv_app/static/js/setting.js
+++ b/agv_app/static/js/setting.js
@@ -131,6 +131,7 @@ createApp({
this.nav2Available = data.nav2_available
if (data.current_pos) {
this.navCurrentPos = data.current_pos
+ console.log('[Setting] refresh nav:', data.nav2_available, 'current_pos:', data.current_pos ? data.current_pos.map(function(x){return x.toFixed(2)}) : null, 'mapLoaded:', this.mapLoaded, 'mapMeta:', this.mapMeta ? 'ok' : 'null')
}
}
} catch (e) {}
@@ -295,6 +296,8 @@ createApp({
this.missionConfig.rows = data.config.rows || 3
this.missionConfig.cols = data.config.cols || 3
this.missionConfig.grid = data.config.grid || []
+ this.missionConfig.positions = data.config.positions || []
+ this.missionConfig.machines = data.config.machines || []
}
} catch (e) { console.error('加载任务配置失败', e) }
},