Fix for long click (#2172)

With uint8_t length function _buttonMapReleased never returned BUTTON_EVENT_LNGCLICK. BUTTON_EVENT_CLICK returned instesd. I verified that with uint16_t length it returns BUTTON_EVENT_LNGCLICK when correspondent delay passed.
This commit is contained in:
DmitryBlinov
2020-03-08 01:31:16 +02:00
committed by GitHub
parent 8f7d77b2a1
commit 6017ad9474

View File

@@ -134,7 +134,7 @@ constexpr const unsigned char _buttonDecodeEventAction(unsigned long actions, un
);
}
constexpr const uint8_t _buttonMapReleased(uint8_t count, uint8_t length) {
constexpr const uint8_t _buttonMapReleased(uint8_t count, uint16_t length) {
return (
(1 == count) ? (
(length > BUTTON_LNGLNGCLICK_DELAY) ? BUTTON_EVENT_LNGLNGCLICK :