tirecheck-device-sdk 0.2.61 → 0.2.63
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 +3 -2
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -362,7 +362,7 @@ const bridgeTools = {
|
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
364
|
function getBridgeFromStore(deviceId) {
|
|
365
|
-
const deviceData = store.devices[deviceId];
|
|
365
|
+
const deviceData = store.devices[deviceId] ?? store.simulatedDevices[deviceId];
|
|
366
366
|
if (!deviceData) throw new Error(`No device data found: ${deviceId}`);
|
|
367
367
|
if (deviceData.type !== "bridge") throw new Error("Device is not bridge");
|
|
368
368
|
return deviceData;
|
|
@@ -4540,7 +4540,8 @@ function createTirecheckDeviceSdk(platform, bleImplementation, securityKeys) {
|
|
|
4540
4540
|
utils: {
|
|
4541
4541
|
bridge: {
|
|
4542
4542
|
convertBarToKpaByte: bridgeTools.convertBarToKpaByte,
|
|
4543
|
-
convertKpaByteToBar: bridgeTools.convertKpaByteToBar
|
|
4543
|
+
convertKpaByteToBar: bridgeTools.convertKpaByteToBar,
|
|
4544
|
+
isVersionGreaterThan: bridgeTools.isVersionGreaterThan
|
|
4544
4545
|
}
|
|
4545
4546
|
}
|
|
4546
4547
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -1042,6 +1042,7 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
|
|
|
1042
1042
|
bridge: {
|
|
1043
1043
|
convertBarToKpaByte: (deviceId: string, value?: number) => number;
|
|
1044
1044
|
convertKpaByteToBar: (deviceId: string, value?: number, decrementValue?: number) => number;
|
|
1045
|
+
isVersionGreaterThan: (deviceId: string, version: string) => boolean;
|
|
1045
1046
|
};
|
|
1046
1047
|
};
|
|
1047
1048
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1042,6 +1042,7 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
|
|
|
1042
1042
|
bridge: {
|
|
1043
1043
|
convertBarToKpaByte: (deviceId: string, value?: number) => number;
|
|
1044
1044
|
convertKpaByteToBar: (deviceId: string, value?: number, decrementValue?: number) => number;
|
|
1045
|
+
isVersionGreaterThan: (deviceId: string, version: string) => boolean;
|
|
1045
1046
|
};
|
|
1046
1047
|
};
|
|
1047
1048
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1042,6 +1042,7 @@ declare function createTirecheckDeviceSdk(platform: DevicePlatform, bleImplement
|
|
|
1042
1042
|
bridge: {
|
|
1043
1043
|
convertBarToKpaByte: (deviceId: string, value?: number) => number;
|
|
1044
1044
|
convertKpaByteToBar: (deviceId: string, value?: number, decrementValue?: number) => number;
|
|
1045
|
+
isVersionGreaterThan: (deviceId: string, version: string) => boolean;
|
|
1045
1046
|
};
|
|
1046
1047
|
};
|
|
1047
1048
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -355,7 +355,7 @@ const bridgeTools = {
|
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
function getBridgeFromStore(deviceId) {
|
|
358
|
-
const deviceData = store.devices[deviceId];
|
|
358
|
+
const deviceData = store.devices[deviceId] ?? store.simulatedDevices[deviceId];
|
|
359
359
|
if (!deviceData) throw new Error(`No device data found: ${deviceId}`);
|
|
360
360
|
if (deviceData.type !== "bridge") throw new Error("Device is not bridge");
|
|
361
361
|
return deviceData;
|
|
@@ -4533,7 +4533,8 @@ function createTirecheckDeviceSdk(platform, bleImplementation, securityKeys) {
|
|
|
4533
4533
|
utils: {
|
|
4534
4534
|
bridge: {
|
|
4535
4535
|
convertBarToKpaByte: bridgeTools.convertBarToKpaByte,
|
|
4536
|
-
convertKpaByteToBar: bridgeTools.convertKpaByteToBar
|
|
4536
|
+
convertKpaByteToBar: bridgeTools.convertKpaByteToBar,
|
|
4537
|
+
isVersionGreaterThan: bridgeTools.isVersionGreaterThan
|
|
4537
4538
|
}
|
|
4538
4539
|
}
|
|
4539
4540
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.63",
|
|
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",
|