tirecheck-device-sdk 0.2.72 → 0.2.73
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 +1 -24
- package/dist/index.mjs +1 -24
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2743,33 +2743,10 @@ async function getRxSWIN(deviceId, configuration) {
|
|
|
2743
2743
|
transparentFilteredMode[0] ?? 0,
|
|
2744
2744
|
fwMajor
|
|
2745
2745
|
];
|
|
2746
|
-
|
|
2747
|
-
console.log(`[getRxSWIN] e141: ${e141Input}`);
|
|
2748
|
-
const result = {
|
|
2746
|
+
return {
|
|
2749
2747
|
R10SWIN: decimalToHex(bridgeSecurity.crc16Ccitt(e010Input), 4),
|
|
2750
2748
|
R141SWIN: decimalToHex(bridgeSecurity.crc16Ccitt(e141Input), 4)
|
|
2751
2749
|
};
|
|
2752
|
-
const item1Content = [
|
|
2753
|
-
...bridgeTools.asciiToDecimalArray("R010"),
|
|
2754
|
-
32,
|
|
2755
|
-
...bridgeTools.asciiToDecimalArray(result.R10SWIN)
|
|
2756
|
-
];
|
|
2757
|
-
const item2Content = [
|
|
2758
|
-
...bridgeTools.asciiToDecimalArray("R141"),
|
|
2759
|
-
32,
|
|
2760
|
-
...bridgeTools.asciiToDecimalArray(result.R141SWIN)
|
|
2761
|
-
];
|
|
2762
|
-
const item1 = [item1Content.length, ...item1Content];
|
|
2763
|
-
const item2 = [item2Content.length, ...item2Content];
|
|
2764
|
-
const payload = [...item1, ...item2];
|
|
2765
|
-
console.log(
|
|
2766
|
-
`[getRxSWIN] R010 item: "${String.fromCharCode(...item1.slice(1))}" (${item1.map((b) => decimalToHex(b)).join(" ")})`
|
|
2767
|
-
);
|
|
2768
|
-
console.log(
|
|
2769
|
-
`[getRxSWIN] R141 item: "${String.fromCharCode(...item2.slice(1))}" (${item2.map((b) => decimalToHex(b)).join(" ")})`
|
|
2770
|
-
);
|
|
2771
|
-
console.log(`[getRxSWIN] final payload (${payload.length}B): ${payload.map((b) => decimalToHex(b)).join(" ")}`);
|
|
2772
|
-
return result;
|
|
2773
2750
|
}
|
|
2774
2751
|
function bridgeVehiclesDifference(original, change) {
|
|
2775
2752
|
const differences = [];
|
package/dist/index.mjs
CHANGED
|
@@ -2736,33 +2736,10 @@ async function getRxSWIN(deviceId, configuration) {
|
|
|
2736
2736
|
transparentFilteredMode[0] ?? 0,
|
|
2737
2737
|
fwMajor
|
|
2738
2738
|
];
|
|
2739
|
-
|
|
2740
|
-
console.log(`[getRxSWIN] e141: ${e141Input}`);
|
|
2741
|
-
const result = {
|
|
2739
|
+
return {
|
|
2742
2740
|
R10SWIN: decimalToHex(bridgeSecurity.crc16Ccitt(e010Input), 4),
|
|
2743
2741
|
R141SWIN: decimalToHex(bridgeSecurity.crc16Ccitt(e141Input), 4)
|
|
2744
2742
|
};
|
|
2745
|
-
const item1Content = [
|
|
2746
|
-
...bridgeTools.asciiToDecimalArray("R010"),
|
|
2747
|
-
32,
|
|
2748
|
-
...bridgeTools.asciiToDecimalArray(result.R10SWIN)
|
|
2749
|
-
];
|
|
2750
|
-
const item2Content = [
|
|
2751
|
-
...bridgeTools.asciiToDecimalArray("R141"),
|
|
2752
|
-
32,
|
|
2753
|
-
...bridgeTools.asciiToDecimalArray(result.R141SWIN)
|
|
2754
|
-
];
|
|
2755
|
-
const item1 = [item1Content.length, ...item1Content];
|
|
2756
|
-
const item2 = [item2Content.length, ...item2Content];
|
|
2757
|
-
const payload = [...item1, ...item2];
|
|
2758
|
-
console.log(
|
|
2759
|
-
`[getRxSWIN] R010 item: "${String.fromCharCode(...item1.slice(1))}" (${item1.map((b) => decimalToHex(b)).join(" ")})`
|
|
2760
|
-
);
|
|
2761
|
-
console.log(
|
|
2762
|
-
`[getRxSWIN] R141 item: "${String.fromCharCode(...item2.slice(1))}" (${item2.map((b) => decimalToHex(b)).join(" ")})`
|
|
2763
|
-
);
|
|
2764
|
-
console.log(`[getRxSWIN] final payload (${payload.length}B): ${payload.map((b) => decimalToHex(b)).join(" ")}`);
|
|
2765
|
-
return result;
|
|
2766
2743
|
}
|
|
2767
2744
|
function bridgeVehiclesDifference(original, change) {
|
|
2768
2745
|
const differences = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.73",
|
|
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",
|