@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 +6 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test/padbot.test.mjs +15 -1
package/dist/index.mjs
CHANGED
|
@@ -65015,6 +65015,13 @@ function createPadbotAdapter(credentials, options = {}) {
|
|
|
65015
65015
|
robot.position = { x: lx, y: ly, theta: (num(loc.yaw ?? loc.r) ?? 0) * Math.PI / 180 };
|
|
65016
65016
|
robot.planPosition = padbotPlanShare(map, lx, ly);
|
|
65017
65017
|
}
|
|
65018
|
+
const last = heard?.pose;
|
|
65019
|
+
if (!robot.position && last && (last.mapId === null || last.mapId === robot.mapId) && (robot.mode === "IDLE" || robot.mode === "CHARGING_CYCLE" || robot.mode === "CHARGED")) {
|
|
65020
|
+
robot.position = { x: last.x, y: last.y, theta: (last.yawDeg ?? 0) * Math.PI / 180 };
|
|
65021
|
+
robot.planPosition = padbotPlanShare(map, last.x, last.y);
|
|
65022
|
+
const mins = Math.floor((now() - last.at) / 6e4);
|
|
65023
|
+
robot.statusName = `${robot.statusName} \xB7 Last reported position${mins >= 1 ? ` (${mins} min ago)` : ""}`;
|
|
65024
|
+
}
|
|
65018
65025
|
if (!robot.position)
|
|
65019
65026
|
robot.statusName = `${robot.statusName} \xB7 Position not reported`;
|
|
65020
65027
|
if (alarm)
|