Configurable TOUCH_BUTTONS repeat delays (#15245)
This commit is contained in:
committed by
Scott Lahteine
parent
f01f0d1956
commit
d277e93f4d
@ -2062,6 +2062,9 @@
|
||||
//
|
||||
//#define TOUCH_BUTTONS
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
|
||||
#define XPT2046_X_CALIBRATION 12316
|
||||
#define XPT2046_Y_CALIBRATION -8981
|
||||
#define XPT2046_X_OFFSET -43
|
||||
@ -2201,7 +2204,7 @@
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
@ -144,7 +144,7 @@ void MenuItem_gcode::action(PGM_P const pgcode) { queue.inject_P(pgcode); }
|
||||
*/
|
||||
void MenuItemBase::edit(strfunc_t strfunc, loadfunc_t loadfunc) {
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
ui.repeat_delay = 50;
|
||||
ui.repeat_delay = BUTTON_DELAY_EDIT;
|
||||
#endif
|
||||
if (int16_t(ui.encoderPosition) < 0) ui.encoderPosition = 0;
|
||||
if (int16_t(ui.encoderPosition) > maxEditValue) ui.encoderPosition = maxEditValue;
|
||||
@ -216,7 +216,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
|
||||
if (currentScreen != screen) {
|
||||
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
repeat_delay = 250;
|
||||
repeat_delay = BUTTON_DELAY_MENU;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
|
Reference in New Issue
Block a user