@sailingrotevista/rotevista-dash 7.0.34 → 7.0.35

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.
Files changed (2) hide show
  1. package/app.js +6 -5
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -373,17 +373,18 @@ function processIncomingData(path, val, source, timeMs) {
373
373
  }
374
374
  }
375
375
 
376
- // Aggiorna sempre lo stato raw istantaneo all'ultimo millisecondo per massimizzare la precisione digitale
377
- store.timestamps[path] = now;
376
+ // Aggiorna lo stato raw e sincronizza il timestamp del watchdog sull'orologio locale (Date.now()) per evitare falsi timeout
377
+ const localNow = Date.now();
378
+ store.timestamps[path] = localNow;
378
379
  store.raw[path] = val;
379
380
 
380
- // Converte e aggiorna istantaneamente store.raw["navigation.headingTrue"] prima del rate limiter per evitare ritardi UI
381
+ // Converte e aggiorna istantaneamente store.raw["navigation.headingTrue"] per la UI prima del rate limiter
381
382
  if (path === "navigation.headingMagnetic") {
382
- const hasNativeTrueHdg = store.timestamps["navigation.headingTrueNative"] && (now - store.timestamps["navigation.headingTrueNative"] < 5000);
383
+ const hasNativeTrueHdg = store.timestamps["navigation.headingTrueNative"] && (localNow - store.timestamps["navigation.headingTrueNative"] < 5000);
383
384
  if (!hasNativeTrueHdg) {
384
385
  const variation = store.raw["navigation.magneticVariation"] || 0;
385
386
  store.raw["navigation.headingTrue"] = (val + variation + 2 * Math.PI) % (2 * Math.PI);
386
- store.timestamps["navigation.headingTrue"] = now;
387
+ store.timestamps["navigation.headingTrue"] = localNow;
387
388
  }
388
389
  }
389
390
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailingrotevista/rotevista-dash",
3
- "version": "7.0.34",
3
+ "version": "7.0.35",
4
4
  "description": "Wind Dashboard with navigation and course aids",
5
5
  "main": "index.js",
6
6
  "publishConfig": {