tirecheck-device-sdk 0.2.37 → 0.2.39
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 +11 -4
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +11 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -877,6 +877,12 @@ const bridgeCommandStructures = {
|
|
|
877
877
|
canTermination: {
|
|
878
878
|
size: 1,
|
|
879
879
|
description: "CAN Termination disabled / enabled"
|
|
880
|
+
},
|
|
881
|
+
baudRate: {
|
|
882
|
+
size: 2,
|
|
883
|
+
description: "Baud rate",
|
|
884
|
+
display: "decimal",
|
|
885
|
+
version: "1.0.5"
|
|
880
886
|
}
|
|
881
887
|
}
|
|
882
888
|
},
|
|
@@ -2811,7 +2817,7 @@ const capabilities$2 = [
|
|
|
2811
2817
|
{
|
|
2812
2818
|
id: "button",
|
|
2813
2819
|
processFn: processButtonPress$1,
|
|
2814
|
-
regex:
|
|
2820
|
+
regex: /^\*?[UDLRC]\s?$/
|
|
2815
2821
|
},
|
|
2816
2822
|
{
|
|
2817
2823
|
id: "keepAlive",
|
|
@@ -2848,8 +2854,9 @@ function processKeepAlive(deviceId) {
|
|
|
2848
2854
|
flexiGaugeCommands.sendKeepAlive(deviceId);
|
|
2849
2855
|
}
|
|
2850
2856
|
function processTreadDepth$1(deviceId, value) {
|
|
2851
|
-
const
|
|
2852
|
-
const
|
|
2857
|
+
const isNewFormat = value.includes("TD");
|
|
2858
|
+
const treadDepth = isNewFormat ? value.match(/\d+/)?.[0] : value.match(/T(\d+\.\d+)m/)?.[1];
|
|
2859
|
+
const convertedValue = Number(treadDepth) / (isNewFormat ? 1e3 : 1);
|
|
2853
2860
|
simulatorSvc.triggerEvent("fg:treadDepth", deviceId, convertedValue);
|
|
2854
2861
|
}
|
|
2855
2862
|
function processButtonPress$1(deviceId, value) {
|
|
@@ -3787,7 +3794,7 @@ function getSimulatedBridgeTemplate() {
|
|
|
3787
3794
|
transparentFilteredMode: "01",
|
|
3788
3795
|
spnsPgnsBitmap: "00000000"
|
|
3789
3796
|
},
|
|
3790
|
-
workshopCANSettings: { canTermination: "01" },
|
|
3797
|
+
workshopCANSettings: { canTermination: "01", baudRate: 0 },
|
|
3791
3798
|
customerPressureThresholds: {
|
|
3792
3799
|
axle01: "32190912",
|
|
3793
3800
|
axle02: "32190912",
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -870,6 +870,12 @@ const bridgeCommandStructures = {
|
|
|
870
870
|
canTermination: {
|
|
871
871
|
size: 1,
|
|
872
872
|
description: "CAN Termination disabled / enabled"
|
|
873
|
+
},
|
|
874
|
+
baudRate: {
|
|
875
|
+
size: 2,
|
|
876
|
+
description: "Baud rate",
|
|
877
|
+
display: "decimal",
|
|
878
|
+
version: "1.0.5"
|
|
873
879
|
}
|
|
874
880
|
}
|
|
875
881
|
},
|
|
@@ -2804,7 +2810,7 @@ const capabilities$2 = [
|
|
|
2804
2810
|
{
|
|
2805
2811
|
id: "button",
|
|
2806
2812
|
processFn: processButtonPress$1,
|
|
2807
|
-
regex:
|
|
2813
|
+
regex: /^\*?[UDLRC]\s?$/
|
|
2808
2814
|
},
|
|
2809
2815
|
{
|
|
2810
2816
|
id: "keepAlive",
|
|
@@ -2841,8 +2847,9 @@ function processKeepAlive(deviceId) {
|
|
|
2841
2847
|
flexiGaugeCommands.sendKeepAlive(deviceId);
|
|
2842
2848
|
}
|
|
2843
2849
|
function processTreadDepth$1(deviceId, value) {
|
|
2844
|
-
const
|
|
2845
|
-
const
|
|
2850
|
+
const isNewFormat = value.includes("TD");
|
|
2851
|
+
const treadDepth = isNewFormat ? value.match(/\d+/)?.[0] : value.match(/T(\d+\.\d+)m/)?.[1];
|
|
2852
|
+
const convertedValue = Number(treadDepth) / (isNewFormat ? 1e3 : 1);
|
|
2846
2853
|
simulatorSvc.triggerEvent("fg:treadDepth", deviceId, convertedValue);
|
|
2847
2854
|
}
|
|
2848
2855
|
function processButtonPress$1(deviceId, value) {
|
|
@@ -3780,7 +3787,7 @@ function getSimulatedBridgeTemplate() {
|
|
|
3780
3787
|
transparentFilteredMode: "01",
|
|
3781
3788
|
spnsPgnsBitmap: "00000000"
|
|
3782
3789
|
},
|
|
3783
|
-
workshopCANSettings: { canTermination: "01" },
|
|
3790
|
+
workshopCANSettings: { canTermination: "01", baudRate: 0 },
|
|
3784
3791
|
customerPressureThresholds: {
|
|
3785
3792
|
axle01: "32190912",
|
|
3786
3793
|
axle02: "32190912",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
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",
|