From 2254fdd04911b6f71993bdf9686eb27683b4ed66 Mon Sep 17 00:00:00 2001 From: Amos Blanton Date: Sun, 18 Sep 2022 09:28:11 +0000 Subject: [PATCH] If midnight clear the display to clean up artifacts Since slash is (wisely) very conservative about clearing / redrawing, artifacts from past dates that aren't overwritten tend to stack up. On my watch now where it says "Sun 9/18" there is some left over "T" from last Thursday sticking out to the left of the "S" in "Sun", and some leftover "6" sticking out to the right of the "8" in "18" from two days ago. This should clear everything once a day at midnight so these artifacts get cleared out. --- apps/slash/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/slash/app.js b/apps/slash/app.js index f548bcaf7..c594e5916 100644 --- a/apps/slash/app.js +++ b/apps/slash/app.js @@ -57,6 +57,10 @@ function draw() { var minutes = ("0"+m).substr(-2); g.reset(); + // If midnight clear display to remove day / date artifacts + if (h == 0 && m == 0) + g.clear(); + // Convert to 12hr time mode if (is12Hour && h > 12) { h = h - 12;