@sailingrotevista/rotevista-dash 7.0.26 → 7.0.27
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/app.js +3 -1
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -419,8 +419,9 @@ function processIncomingData(path, val, source, timeMs) {
|
|
|
419
419
|
const variation = store.raw["navigation.magneticVariation"] || 0; // Legge la declinazione magnetica del GPS
|
|
420
420
|
const calculatedTrueHdg = (val + variation + 2 * Math.PI) % (2 * Math.PI);
|
|
421
421
|
|
|
422
|
-
// Registriamo il valore calcolato come Prua Vera temporanea
|
|
422
|
+
// Registriamo il valore calcolato come Prua Vera temporanea e aggiorniamo il timestamp per evitare i timeout del watchdog
|
|
423
423
|
store.raw["navigation.headingTrue"] = calculatedTrueHdg;
|
|
424
|
+
store.timestamps["navigation.headingTrue"] = now; // (AGGIUNTO - RISOLVE IL LOCKOUT)
|
|
424
425
|
safePush(store.smoothBuf.hdg, calculatedTrueHdg, now);
|
|
425
426
|
safePush(store.longBuf.hdg, calculatedTrueHdg, now);
|
|
426
427
|
}
|
|
@@ -436,6 +437,7 @@ function processIncomingData(path, val, source, timeMs) {
|
|
|
436
437
|
const sog = store.raw["navigation.speedOverGround"] || 0;
|
|
437
438
|
if (!hasCompass && sog > 0.77) { // 0.77 m/s = 1.5 nodi
|
|
438
439
|
store.raw["navigation.headingTrue"] = val;
|
|
440
|
+
store.timestamps["navigation.headingTrue"] = now; // (AGGIUNTO - RISOLVE IL LOCKOUT COG)
|
|
439
441
|
safePush(store.smoothBuf.hdg, val, now);
|
|
440
442
|
safePush(store.longBuf.hdg, val, now);
|
|
441
443
|
}
|