From 7e5c67a2b6041f5822cec42e901cf54ace762605 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Tue, 23 Jul 2024 09:16:11 +0100 Subject: [PATCH] fix bug with 100% battery --- apps/quarterclock/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/quarterclock/app.js b/apps/quarterclock/app.js index 7899ff2c7..a668860cd 100644 --- a/apps/quarterclock/app.js +++ b/apps/quarterclock/app.js @@ -63,7 +63,7 @@ // Draw battery box let drawBattery = function drawBattery() { // Round battery up to 10% interval - let battery = (Math.floor(E.getBattery()/10)+1)/10; + let battery = Math.min((Math.floor(E.getBattery()/10)+1)/10, 1); // Maximum battery box let batterySize = 30;