@lifefinder/vsm-mqtt-client-open-source 0.0.54 → 0.0.56
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/package.json +2 -2
- package/rules.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifefinder/vsm-mqtt-client-open-source",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "MQTT client for vsm sensors",
|
|
5
5
|
"main": "vsm-mqtt-client.js",
|
|
6
6
|
"author": "Lars Mats",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"mongodb": "6.3.0",
|
|
15
15
|
"mqtt": "4.3.7",
|
|
16
16
|
"node-fetch": "3.3.1",
|
|
17
|
-
"@lifefinder/vsm-translator-open-source": "^0.2.
|
|
17
|
+
"@lifefinder/vsm-translator-open-source": "^0.2.168"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/rules.js
CHANGED
|
@@ -166,7 +166,7 @@ const rules = [
|
|
|
166
166
|
let receivedDateS = new Date(updates.gnss.deviceTimeTimestamp).getTime()/1000;
|
|
167
167
|
let deltaS = receivedDateS - deviceDateS;
|
|
168
168
|
args.v && console.log("Device time offset: " + deltaS);
|
|
169
|
-
if (deltaS >= 5
|
|
169
|
+
if (Math.abs(deltaS) >= 5) {
|
|
170
170
|
// Send downlink
|
|
171
171
|
console.log("Updating device time for " + deviceid + " by " + deltaS + "s");
|
|
172
172
|
downlinkDeviceTimeDelta(args, integration, client, deviceid, Math.round(deltaS));
|