mirror of https://github.com/arendst/Tasmota.git
stop shutter after longpress of buttons
https://github.com/arendst/Tasmota/discussions/16198 improved behavior on longpress of buttons
This commit is contained in:
parent
5aa7d55c51
commit
45bdaf14fd
|
@ -853,6 +853,12 @@ void ShutterButtonHandler(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NOT_PRESSED == button) {
|
if (NOT_PRESSED == button) {
|
||||||
|
if (Shutter[shutter_index].direction && Button.hold_timer[button_index] > 0) {
|
||||||
|
XdrvMailbox.index = shutter_index +1;
|
||||||
|
XdrvMailbox.payload = XdrvMailbox.index;
|
||||||
|
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d, Button %d, hold %d, dir %d, index %d, payload %d"), shutter_index+1, button_index+1, Button.hold_timer[button_index],Shutter[shutter_index].direction,XdrvMailbox.index,XdrvMailbox.payload);
|
||||||
|
CmndShutterStop();
|
||||||
|
}
|
||||||
Button.hold_timer[button_index] = 0;
|
Button.hold_timer[button_index] = 0;
|
||||||
} else {
|
} else {
|
||||||
Button.hold_timer[button_index]++;
|
Button.hold_timer[button_index]++;
|
||||||
|
|
Loading…
Reference in New Issue