tirecheck-device-sdk 0.1.991 → 0.1.992
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/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2341,9 +2341,10 @@ async function setAxleInfo(deviceId, tcVehicle) {
|
|
|
2341
2341
|
if (spareTyre && spareTyre.tcTpmsSensor?.id) {
|
|
2342
2342
|
tyres[7] = bridgeTools.convertSensorIdForBridge(spareTyre.tcTpmsSensor?.id);
|
|
2343
2343
|
}
|
|
2344
|
-
|
|
2344
|
+
let axleTyres = tcVehicle.tcTyres?.filter(
|
|
2345
2345
|
(t) => t.mountedOn?.positionId ? bridgeTools.getPositionInfo(t.mountedOn?.positionId).axlePosition === axleIndex + 1 && spareTyre?.mountedOn?.positionId !== t.mountedOn?.positionId : false
|
|
2346
2346
|
) || [];
|
|
2347
|
+
axleTyres = axleTyres.sort((a, b) => (a.mountedOn?.positionId || 0) - (b.mountedOn?.positionId || 0));
|
|
2347
2348
|
for (let tyreIndex = 0; tyreIndex < axleTyres.length; tyreIndex++) {
|
|
2348
2349
|
const sensorId = axleTyres[tyreIndex].tcTpmsSensor?.id;
|
|
2349
2350
|
if (!sensorId) continue;
|
package/dist/index.mjs
CHANGED
|
@@ -2334,9 +2334,10 @@ async function setAxleInfo(deviceId, tcVehicle) {
|
|
|
2334
2334
|
if (spareTyre && spareTyre.tcTpmsSensor?.id) {
|
|
2335
2335
|
tyres[7] = bridgeTools.convertSensorIdForBridge(spareTyre.tcTpmsSensor?.id);
|
|
2336
2336
|
}
|
|
2337
|
-
|
|
2337
|
+
let axleTyres = tcVehicle.tcTyres?.filter(
|
|
2338
2338
|
(t) => t.mountedOn?.positionId ? bridgeTools.getPositionInfo(t.mountedOn?.positionId).axlePosition === axleIndex + 1 && spareTyre?.mountedOn?.positionId !== t.mountedOn?.positionId : false
|
|
2339
2339
|
) || [];
|
|
2340
|
+
axleTyres = axleTyres.sort((a, b) => (a.mountedOn?.positionId || 0) - (b.mountedOn?.positionId || 0));
|
|
2340
2341
|
for (let tyreIndex = 0; tyreIndex < axleTyres.length; tyreIndex++) {
|
|
2341
2342
|
const sensorId = axleTyres[tyreIndex].tcTpmsSensor?.id;
|
|
2342
2343
|
if (!sensorId) continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.992",
|
|
4
4
|
"description": "SDK for working with various devices produced by Tirecheck via Bluetooth (CAN Bridge, Routers, Sensors, FlexiGauge, PressureStick, etc)",
|
|
5
5
|
"author": "Leonid Buneev <leonid.buneev@tirecheck.com>",
|
|
6
6
|
"license": "ISC",
|