Reduce BUTTON_MULTI_CLICK_DELAY to 250ms

This commit is contained in:
Edward Firmo
2024-12-22 01:46:28 +01:00
parent c65acc3298
commit fbc5cb79cc
3 changed files with 2 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ substitutions:
BUTTON_CLICK_MIN_LENGTH: '50' # The minimum duration the click should last, in msec BUTTON_CLICK_MIN_LENGTH: '50' # The minimum duration the click should last, in msec
BUTTON_CLICK_MAX_LENGTH: '350' # The maximum duration the click should last, in msec BUTTON_CLICK_MAX_LENGTH: '350' # The maximum duration the click should last, in msec
BUTTON_MULTI_CLICK_DELAY: '500' # The time to wait for another click, in msec BUTTON_MULTI_CLICK_DELAY: '250' # The time to wait for another click, in msec
BUTTON_PRESS_TIMEOUT: '10000' # Ignore if button is pressed for longer than this time, in msec BUTTON_PRESS_TIMEOUT: '10000' # Ignore if button is pressed for longer than this time, in msec
BUTTON_LONG_PRESS_DELAY: '800' # The time to wait to consider a long press, in msec BUTTON_LONG_PRESS_DELAY: '800' # The time to wait to consider a long press, in msec

View File

@@ -113,9 +113,6 @@ script:
- id: !extend button_click_event - id: !extend button_click_event
then: then:
- lambda: |- - lambda: |-
ESP_LOGW("DEBUG", "button_click_event");
ESP_LOGW("DEBUG", " button_id: %" PRIu8, button_id);
ESP_LOGW("DEBUG", " click_count: %" PRIu8, click_count);
if (click_count == 1) { // Single click if (click_count == 1) { // Single click
if (!bs_multi_touch->state and if (!bs_multi_touch->state and
!bs_swipe_left->state and !bs_swipe_left->state and

View File

@@ -52,6 +52,7 @@ namespace esphome {
} }
bool TxUltimateEasy::set_gang_count(const uint8_t gang_count) { bool TxUltimateEasy::set_gang_count(const uint8_t gang_count) {
// Hardware supports maximum of 4 touch-sensitive buttons
if (gang_count < 1 or gang_count > 4) if (gang_count < 1 or gang_count > 4)
return false; return false;
this->gang_count_ = gang_count; this->gang_count_ = gang_count;