tirecheck-device-sdk 0.1.997 → 0.1.999
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 +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2906,6 +2906,7 @@ const bridgeSimulator = {
|
|
|
2906
2906
|
},
|
|
2907
2907
|
async setVehicle(deviceId, vehicle) {
|
|
2908
2908
|
const bridge = getSimulatedBridge(deviceId);
|
|
2909
|
+
bridge.vin = vehicle.vin ?? bridge.vin;
|
|
2909
2910
|
bridge.simulatorData.vehicle = vehicle;
|
|
2910
2911
|
},
|
|
2911
2912
|
async getConfiguration(deviceId) {
|
|
@@ -2924,6 +2925,7 @@ const bridgeSimulator = {
|
|
|
2924
2925
|
const bridge = getSimulatedBridge(deviceId);
|
|
2925
2926
|
const readings = ___default.values(bridge.simulatorData.sensors);
|
|
2926
2927
|
for (const reading of readings) {
|
|
2928
|
+
reading.date = (/* @__PURE__ */ new Date()).getTime();
|
|
2927
2929
|
reading.pressureIssue = getPressureIssue(deviceId, reading.eceStatus);
|
|
2928
2930
|
}
|
|
2929
2931
|
return readings;
|
|
@@ -2963,7 +2965,16 @@ const bridgeSimulator = {
|
|
|
2963
2965
|
store.setState(deviceId, void 0, "manualDisconnection");
|
|
2964
2966
|
},
|
|
2965
2967
|
createSimulatedDevice(initialData) {
|
|
2966
|
-
|
|
2968
|
+
const mergedData = simulatorSvc.merge(getSimulatedBridgeTemplate(), initialData);
|
|
2969
|
+
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)) ?? [
|
|
2970
|
+
1,
|
|
2971
|
+
2,
|
|
2972
|
+
3,
|
|
2973
|
+
4,
|
|
2974
|
+
5,
|
|
2975
|
+
6
|
|
2976
|
+
];
|
|
2977
|
+
return mergedData;
|
|
2967
2978
|
}
|
|
2968
2979
|
};
|
|
2969
2980
|
function getPressureIssue(deviceId, eceStatus) {
|
package/dist/index.mjs
CHANGED
|
@@ -2899,6 +2899,7 @@ const bridgeSimulator = {
|
|
|
2899
2899
|
},
|
|
2900
2900
|
async setVehicle(deviceId, vehicle) {
|
|
2901
2901
|
const bridge = getSimulatedBridge(deviceId);
|
|
2902
|
+
bridge.vin = vehicle.vin ?? bridge.vin;
|
|
2902
2903
|
bridge.simulatorData.vehicle = vehicle;
|
|
2903
2904
|
},
|
|
2904
2905
|
async getConfiguration(deviceId) {
|
|
@@ -2917,6 +2918,7 @@ const bridgeSimulator = {
|
|
|
2917
2918
|
const bridge = getSimulatedBridge(deviceId);
|
|
2918
2919
|
const readings = _.values(bridge.simulatorData.sensors);
|
|
2919
2920
|
for (const reading of readings) {
|
|
2921
|
+
reading.date = (/* @__PURE__ */ new Date()).getTime();
|
|
2920
2922
|
reading.pressureIssue = getPressureIssue(deviceId, reading.eceStatus);
|
|
2921
2923
|
}
|
|
2922
2924
|
return readings;
|
|
@@ -2956,7 +2958,16 @@ const bridgeSimulator = {
|
|
|
2956
2958
|
store.setState(deviceId, void 0, "manualDisconnection");
|
|
2957
2959
|
},
|
|
2958
2960
|
createSimulatedDevice(initialData) {
|
|
2959
|
-
|
|
2961
|
+
const mergedData = simulatorSvc.merge(getSimulatedBridgeTemplate(), initialData);
|
|
2962
|
+
mergedData.advertisingData.macAddress = initialData.id?.split(":").map((x) => Number.parseInt(x, 16)) ?? [
|
|
2963
|
+
1,
|
|
2964
|
+
2,
|
|
2965
|
+
3,
|
|
2966
|
+
4,
|
|
2967
|
+
5,
|
|
2968
|
+
6
|
|
2969
|
+
];
|
|
2970
|
+
return mergedData;
|
|
2960
2971
|
}
|
|
2961
2972
|
};
|
|
2962
2973
|
function getPressureIssue(deviceId, eceStatus) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirecheck-device-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.999",
|
|
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",
|