From 4d0dc3518c8123200efbacef55104333086de229 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 13 Mar 2026 23:18:50 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20touch=20delay=20defines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to c73245a3d9 --- Marlin/src/lcd/tft/touch.cpp | 6 +++--- Marlin/src/lcd/tft/touch.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 0815f3d7fd..4d76f8ab48 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -229,11 +229,11 @@ void Touch::touch(touch_control_t * const control) { // Increase / Decrease controls are held with an ever-decreasing repeat delay case INCREASE: - hold(control, repeat_delay - 5, TOUCH_REPEAT_FIRST_DELAY); + hold(control, repeat_delay - (FAST_REPEAT_DECREMENT)); TERN(AUTO_BED_LEVELING_UBL, ui.external_control ? bedlevel.encoder_diff++ : ui.encoderPosition++, ui.encoderPosition++); break; case DECREASE: - hold(control, repeat_delay - 5, TOUCH_REPEAT_FIRST_DELAY); + hold(control, repeat_delay - (FAST_REPEAT_DECREMENT)); TERN(AUTO_BED_LEVELING_UBL, ui.external_control ? bedlevel.encoder_diff-- : ui.encoderPosition--, ui.encoderPosition--); break; @@ -311,7 +311,7 @@ void Touch::touch(touch_control_t * const control) { #if ENABLED(AUTO_BED_LEVELING_UBL) case UBL: - hold(control, UBL_REPEAT_DELAY, TOUCH_REPEAT_FIRST_DELAY); + hold(control, UBL_REPEAT_DELAY); ui.encoderPosition += control->data; break; #endif diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index 991619e570..ad1317d5c9 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -68,6 +68,7 @@ typedef struct __attribute__((__packed__)) { #define MINIMUM_HOLD_TIME 15 // Debounce delay for ignoring short accidental touch #define TOUCH_REPEAT_DELAY 100 // 1/10s Repeat delay for key-like buttons #define MIN_REPEAT_DELAY 25 // Smallest permitted repeat delay for controls that speed up the longer they are held +#define FAST_REPEAT_DECREMENT 5 // Repeat delay may decrease for a control as it is held #define UBL_REPEAT_DELAY 125 // Repeat delay for a held control #define FREE_MOVE_RANGE 32 // Area around a control allowed before aborting a held control