tirecheck-device-sdk 0.2.24 → 0.2.26
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 +5 -9
- package/dist/index.mjs +5 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3277,7 +3277,10 @@ const torqueWrench = {
|
|
|
3277
3277
|
},
|
|
3278
3278
|
async disconnect(deviceId, reason) {
|
|
3279
3279
|
store.setState(deviceId, "disconnecting");
|
|
3280
|
-
|
|
3280
|
+
try {
|
|
3281
|
+
await torqueWrenchService.stopJob(deviceId);
|
|
3282
|
+
} catch {
|
|
3283
|
+
}
|
|
3281
3284
|
await torqueWrenchPromiseQueue.clearQueue(deviceId, "Previous pending commands aborted");
|
|
3282
3285
|
await bluetooth.disconnect(deviceId);
|
|
3283
3286
|
store.setState(deviceId, void 0, reason ?? "manualDisconnection");
|
|
@@ -3379,14 +3382,7 @@ const bridgeSimulator = {
|
|
|
3379
3382
|
},
|
|
3380
3383
|
createSimulatedDevice(initialData) {
|
|
3381
3384
|
const mergedData = simulatorSvc.merge(getSimulatedBridgeTemplate(), initialData);
|
|
3382
|
-
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)) ?? [
|
|
3383
|
-
1,
|
|
3384
|
-
2,
|
|
3385
|
-
3,
|
|
3386
|
-
4,
|
|
3387
|
-
5,
|
|
3388
|
-
6
|
|
3389
|
-
];
|
|
3385
|
+
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)).reverse() ?? [1, 2, 3, 4, 5, 6];
|
|
3390
3386
|
return mergedData;
|
|
3391
3387
|
}
|
|
3392
3388
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -3270,7 +3270,10 @@ const torqueWrench = {
|
|
|
3270
3270
|
},
|
|
3271
3271
|
async disconnect(deviceId, reason) {
|
|
3272
3272
|
store.setState(deviceId, "disconnecting");
|
|
3273
|
-
|
|
3273
|
+
try {
|
|
3274
|
+
await torqueWrenchService.stopJob(deviceId);
|
|
3275
|
+
} catch {
|
|
3276
|
+
}
|
|
3274
3277
|
await torqueWrenchPromiseQueue.clearQueue(deviceId, "Previous pending commands aborted");
|
|
3275
3278
|
await bluetooth.disconnect(deviceId);
|
|
3276
3279
|
store.setState(deviceId, void 0, reason ?? "manualDisconnection");
|
|
@@ -3372,14 +3375,7 @@ const bridgeSimulator = {
|
|
|
3372
3375
|
},
|
|
3373
3376
|
createSimulatedDevice(initialData) {
|
|
3374
3377
|
const mergedData = simulatorSvc.merge(getSimulatedBridgeTemplate(), initialData);
|
|
3375
|
-
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)) ?? [
|
|
3376
|
-
1,
|
|
3377
|
-
2,
|
|
3378
|
-
3,
|
|
3379
|
-
4,
|
|
3380
|
-
5,
|
|
3381
|
-
6
|
|
3382
|
-
];
|
|
3378
|
+
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)).reverse() ?? [1, 2, 3, 4, 5, 6];
|
|
3383
3379
|
return mergedData;
|
|
3384
3380
|
}
|
|
3385
3381
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26",
|
|
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",
|