From f6f42fbb458ac6ee05023920bc086489796b26f4 Mon Sep 17 00:00:00 2001 From: ElementalAlchemist Date: Fri, 15 Nov 2024 03:37:05 -0600 Subject: [PATCH] Minor cleanup of the standard mode --- thrimbletrimmer/driveclock/drive.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/thrimbletrimmer/driveclock/drive.js b/thrimbletrimmer/driveclock/drive.js index 114db63..ff31267 100644 --- a/thrimbletrimmer/driveclock/drive.js +++ b/thrimbletrimmer/driveclock/drive.js @@ -172,13 +172,11 @@ function drawRoadDynamic(context, busData) { } const startMinute = busData.clock_minutes; - const timeDuration = BUS_TRAVEL_WIDTH / (3 * scaleFactor); let previousTime = startMinute; let previousTimeOfDay = timeOfDay; - let remainingDuration = timeDuration; let x = BUS_FRONT_OFFSET; - while (remainingDuration > 0) { + while (x < CANVAS_PIXEL_WIDTH) { const nextTimeOfDay = nextPhase(previousTimeOfDay); const nextStartTime = phaseStartTime(nextTimeOfDay); @@ -190,7 +188,6 @@ function drawRoadDynamic(context, busData) { const pixelWidth = thisDuration * 3 * scaleFactor; drawBackground(context, previousTimeOfDay, x, pixelWidth); - remainingDuration -= thisDuration; previousTime = nextStartTime; previousTimeOfDay = nextTimeOfDay; x += pixelWidth;