From 8cf15e85463361289820b240d0de527d47852992 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Wed, 14 Jul 2021 16:56:02 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Call=20millis()=20once=20in=20ma?= =?UTF-8?q?nage=5Finactivity=20(#22363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 39f4a418c0..1c2002f795 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -510,7 +510,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL; static millis_t next_home_key_ms; // = 0 if (!IS_SD_PRINTING() && !READ(HOME_PIN)) { // HOME_PIN goes LOW when pressed - const millis_t ms = millis(); if (ELAPSED(ms, next_home_key_ms)) { next_home_key_ms = ms + HOME_DEBOUNCE_DELAY; LCD_MESSAGEPGM(MSG_AUTO_HOME); @@ -522,7 +521,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { #if ENABLED(CUSTOM_USER_BUTTONS) // Handle a custom user button if defined const bool printer_not_busy = !printingIsActive(); - const millis_t ms = millis(); #define HAS_CUSTOM_USER_BUTTON(N) (PIN_EXISTS(BUTTON##N) && defined(BUTTON##N##_HIT_STATE) && defined(BUTTON##N##_GCODE)) #define HAS_BETTER_USER_BUTTON(N) HAS_CUSTOM_USER_BUTTON(N) && defined(BUTTON##N##_DESC) #define _CHECK_CUSTOM_USER_BUTTON(N, CODE) do{ \