From 0b4f65dca83d2e87a758c59953354cf6367247eb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 1 Apr 2016 14:20:47 -0700 Subject: [PATCH] Always limit blink to ~1 second intervals --- Marlin/ultralcd.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index cd143a180..141187dcb 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1822,9 +1822,10 @@ int lcd_strlen_P(const char* s) { bool lcd_blink() { static uint8_t blink = 0; static millis_t next_blink_ms = 0; - if (millis() >= next_blink_ms) { + millis_t ms = millis(); + if (ms >= next_blink_ms) { blink ^= 0xFF; - next_blink_ms = millis() + LCD_UPDATE_INTERVAL - 50; + next_blink_ms = ms + 1000 - LCD_UPDATE_INTERVAL / 2; } return blink != 0; }