From e47065a66d3555132dab750b03fa236ccad8596f Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 16 Jan 2021 15:14:36 +0000 Subject: [PATCH] Put back SetOption40 support. --- tasmota/support_button.ino | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasmota/support_button.ino b/tasmota/support_button.ino index 53fb218ba..473183665 100644 --- a/tasmota/support_button.ino +++ b/tasmota/support_button.ino @@ -270,6 +270,15 @@ void ButtonHandler(void) { ExecuteCommand(scmnd, SRC_BUTTON); } } + else + { + if (Settings.param[P_HOLD_IGNORE] > 0) { // SetOption40 (0) - Do not ignore button hold + if (Button.hold_timer[button_index] > loops_per_second * Settings.param[P_HOLD_IGNORE] / 10) { + Button.hold_timer[button_index] = 0; // Reset button hold counter to stay below hold trigger + Button.press_counter[button_index] = 0; // Discard button press to disable functionality + } + } + } } } }