From 3f20df75711fb8525698c3bc28c7e58d925360e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomislav=20Kopi=C4=87?= Date: Tue, 5 Nov 2024 19:39:55 +0100 Subject: [PATCH] Fix ping pong scroll logic --- src/octoprint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint.h b/src/octoprint.h index a0d23c9..77d5290 100644 --- a/src/octoprint.h +++ b/src/octoprint.h @@ -138,7 +138,7 @@ bool fetchPrintingStatus(Adafruit_SSD1306& display) { display.fillRect(0, 26, displayWidth, 11, BLACK); // Check if it’s time to scroll based on the delay - if(fileNameWidth > 22) { + if(fileNameWidth > displayWidth) { if (millis() - lastScrollTime > scrollDelay) { // Update scroll position based on the current direction scrollPos += scrollDirection;