deploy: full sync to AGV work directory

This commit is contained in:
ywb
2026-05-18 01:30:33 +08:00
parent 6f876968a9
commit 171090a3d0
+6 -4
View File
@@ -128,10 +128,12 @@ createApp({
const res = await fetch(API + '/api/navigate/status')
if (res.ok) {
const data = await res.json()
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')
this.nav2Available = data.nav2_available || false
// API returns "current_position", normalize to our field
const cp = data.current_position || data.current_pos || null
if (cp) {
this.navCurrentPos = cp
console.log('[Setting] nav2:', data.nav2_available, 'cp:', cp.map(function(x){return x.toFixed(2)}), 'mapLoaded:', this.mapLoaded, 'mapMeta:', this.mapMeta ? 'ok' : 'null')
}
}
} catch (e) {}