Vacuum adapter vs a live Dreame X50 Master

Checked against the real robot at the dacha: room centres arrive as
plain x/y next to the bbox, and the active-map name (selected_map,
'Первый этаж'/'Второй этаж') lives on the VACUUM entity, not on the
camera — without reading it both floors would silently share one
calibration matrix. Parser and card resolver adjusted; the captured
attribute shape is now a unit fixture.
This commit is contained in:
Matysh
2026-07-31 09:28:20 +03:00
parent 40abbccbf0
commit 0142d37bec
6 changed files with 37 additions and 9 deletions
+3
View File
@@ -120,6 +120,9 @@ export function readVacTelemetry(attrs: Record<string, any> | null | undefined):
cx = (x0 + x1) / 2; cy = (y0 + y1) / 2;
}
}
// Tasshack dreame-vacuum: the room centre is plain x/y (verified against
// a live X50 Master; x/y sits within its own x0..x1 bbox)
if (cx == null || cy == null) { cx = num(r.x); cy = num(r.y); }
if (name && cx != null && cy != null) rooms.push({ id, name, cx, cy });
}
const mapId = String(attrs.map_name ?? attrs.current_map ?? attrs.map_index ?? attrs.selected_map ?? 'default');