mirror of https://github.com/arendst/Tasmota.git
Merge pull request #16174 from stefanbode/patch-6
Enhance behavior of tilt changes at end points 0% and 100%
This commit is contained in:
commit
86cba4acb1
|
@ -980,6 +980,10 @@ void ShutterButtonHandler(void)
|
||||||
XdrvMailbox.payload = XdrvMailbox.index;
|
XdrvMailbox.payload = XdrvMailbox.index;
|
||||||
CmndShutterToggle();
|
CmndShutterToggle();
|
||||||
} else {
|
} else {
|
||||||
|
if (position == ShutterRealToPercentPosition(Shutter[XdrvMailbox.index-1].real_position, XdrvMailbox.index-1) ) {
|
||||||
|
Shutter[XdrvMailbox.index -1].tilt_target_pos = position==0? Shutter[XdrvMailbox.index -1].tilt_config[0]:(position==100?Shutter[XdrvMailbox.index -1].tilt_config[1]:Shutter[XdrvMailbox.index -1].tilt_target_pos);
|
||||||
|
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d -> Endpoint movement detected at %d. Set Tilt: %d"), shutter_index+1, position, Shutter[XdrvMailbox.index -1].tilt_target_pos);
|
||||||
|
}
|
||||||
CmndShutterPosition();
|
CmndShutterPosition();
|
||||||
}
|
}
|
||||||
if (Settings->shutter_button[button_index] & ((0x01<<26)<<pos_press_index)) {
|
if (Settings->shutter_button[button_index] & ((0x01<<26)<<pos_press_index)) {
|
||||||
|
|
Loading…
Reference in New Issue