@7365admin1/core 3.122.2 → 3.122.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.122.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 67d031a: 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.
8
+
3
9
  ## 3.122.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -65669,6 +65669,13 @@ function createPadbotAdapter(credentials, options = {}) {
65669
65669
  robot.position = { x: lx, y: ly, theta: (num(loc.yaw ?? loc.r) ?? 0) * Math.PI / 180 };
65670
65670
  robot.planPosition = padbotPlanShare(map, lx, ly);
65671
65671
  }
65672
+ const last = heard?.pose;
65673
+ if (!robot.position && last && (last.mapId === null || last.mapId === robot.mapId) && (robot.mode === "IDLE" || robot.mode === "CHARGING_CYCLE" || robot.mode === "CHARGED")) {
65674
+ robot.position = { x: last.x, y: last.y, theta: (last.yawDeg ?? 0) * Math.PI / 180 };
65675
+ robot.planPosition = padbotPlanShare(map, last.x, last.y);
65676
+ const mins = Math.floor((now() - last.at) / 6e4);
65677
+ robot.statusName = `${robot.statusName} \xB7 Last reported position${mins >= 1 ? ` (${mins} min ago)` : ""}`;
65678
+ }
65672
65679
  if (!robot.position)
65673
65680
  robot.statusName = `${robot.statusName} \xB7 Position not reported`;
65674
65681
  if (alarm)