@7365admin1/core 3.99.1-staging.403 → 3.99.1-staging.404

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ PadBot: when the location read answers null coordinates for a robot standing still (seen on the real S2 while docked), the robot's own last MQTT position on the same map is used and shown as "Last reported position (N min ago)". It is never used while the robot is moving or for another map.
package/dist/index.js CHANGED
@@ -67323,6 +67323,13 @@ function createPadbotAdapter(credentials, options = {}) {
67323
67323
  robot.position = { x: lx, y: ly, theta: (num(loc.yaw ?? loc.r) ?? 0) * Math.PI / 180 };
67324
67324
  robot.planPosition = padbotPlanShare(map, lx, ly);
67325
67325
  }
67326
+ const last = heard?.pose;
67327
+ if (!robot.position && last && (last.mapId === null || last.mapId === robot.mapId) && (robot.mode === "IDLE" || robot.mode === "CHARGING_CYCLE" || robot.mode === "CHARGED")) {
67328
+ robot.position = { x: last.x, y: last.y, theta: (last.yawDeg ?? 0) * Math.PI / 180 };
67329
+ robot.planPosition = padbotPlanShare(map, last.x, last.y);
67330
+ const mins = Math.floor((now() - last.at) / 6e4);
67331
+ robot.statusName = `${robot.statusName} \xB7 Last reported position${mins >= 1 ? ` (${mins} min ago)` : ""}`;
67332
+ }
67326
67333
  if (!robot.position)
67327
67334
  robot.statusName = `${robot.statusName} \xB7 Position not reported`;
67328
67335
  if (alarm)