Support Setoption13 1 on shutters to immediate feedback

This commit is contained in:
stefanbode 2022-12-04 13:25:20 +01:00 committed by GitHub
parent 5f8ef0c5cb
commit 9be44131b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -864,7 +864,7 @@ void ShutterButtonHandler(void)
} }
if (NOT_PRESSED == button) { if (NOT_PRESSED == button) {
if (Shutter[shutter_index].direction && Button.hold_timer[button_index] > 0) { if (Shutter[shutter_index].direction && (Button.hold_timer[button_index] > 0 && (!Settings->flag.button_single || Button.hold_timer[button_index] > 20))) {
XdrvMailbox.index = shutter_index +1; XdrvMailbox.index = shutter_index +1;
XdrvMailbox.payload = XdrvMailbox.index; 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); //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);