From e1b8d8c6693825e7d8fe24df1fbe2d809ea0a0dd Mon Sep 17 00:00:00 2001 From: David Peer Date: Sun, 19 Dec 2021 20:07:28 +0100 Subject: [PATCH] Set data to zero at 00:00 --- apps/lcars/lcars.app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/lcars/lcars.app.js b/apps/lcars/lcars.app.js index 6fa42f0c3..123a8448e 100644 --- a/apps/lcars/lcars.app.js +++ b/apps/lcars/lcars.app.js @@ -293,6 +293,13 @@ function draw(){ // Handle steps for graph data handleSteps(); + // Clear data + var current = new Date(); + if(current.getHours() == 0 && current.getMinutes() == 0){ + stepsData = new Array(24).fill(0); + hrmData = new Array(24).fill(0); + } + // Next draw the watch face g.reset(); g.clearRect(0, 0, g.getWidth(), g.getHeight());