From 702aa0b4f6ad3a6fafa6e2ccee85e5fdc85f14f0 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 26 Aug 2022 10:31:50 +0200 Subject: [PATCH] handle it better when the clock goes backwards not sure why we need that but it doesn't hurt --- html/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/script.js b/html/script.js index f16a8c8..156c8d4 100644 --- a/html/script.js +++ b/html/script.js @@ -260,9 +260,10 @@ function processReceiverUpdate(data, init) { console.log('timestep backwards, ignoring data:' + now + ' -> ' + data.now); if (backwardsCounter++ > 5) { backwardsCounter = 0; - console.log('resetting now:' + now + ' -> ' + data.now); + console.log('resetting all data now:' + now + ' -> ' + data.now); now = data.now; last = now - 1; + reaper(1); } } return;