From a924ca872a67b008fa1a8877e4f81e455e0bbfbe Mon Sep 17 00:00:00 2001 From: Andy Smy <47543767+AndySmee@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:05:57 +0100 Subject: [PATCH] Update app.js --- apps/umpire/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/umpire/app.js b/apps/umpire/app.js index 4fd3765d8..1c2f5fd37 100644 --- a/apps/umpire/app.js +++ b/apps/umpire/app.js @@ -4,6 +4,7 @@ var over = 0; var ballTimes = []; var overTimes = []; var gameState = "Ready..."; +var countdownDebounce = false; function addLog(timeSig, over, ball, matchEvent, metaData) { // The fields we want to put in out CSV file @@ -25,6 +26,8 @@ function formatTimeOfDay(timeSig) { return timeSig.getHours() + ":" + timeSig.ge function countDown(dir) { + if(!countdownDebounce) { + countdownDebounce = true; counter += dir; if(counter<0) counter=0; @@ -99,6 +102,7 @@ function countDown(dir) { startOver(); } }); + countdownDebounce = false; return; } } @@ -112,7 +116,8 @@ function countDown(dir) { g.setFont("Vector",18); g.drawString("..." + formatDuration(deadDuration), g.getWidth()/1.89, 166); } - + countdownDebounce = false; + } } function startOver() {