From 7927c989c4655cdb5aa961b28d4c2981333714c8 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Fri, 18 Aug 2023 09:02:17 +0200 Subject: [PATCH] fix shutterinvert (#19341) * fix shutterinvert * fix shutterinvert --- tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 5 +++-- tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index 538e11fe4..c0383ccf9 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -1515,8 +1515,9 @@ void CmndShutterPosition(void) int8_t target_pos_percent = (XdrvMailbox.payload < 0) ? (XdrvMailbox.payload == -99 ? ShutterRealToPercentPosition(Shutter[index].real_position, index) : 0) : ((XdrvMailbox.payload > 100) ? 100 : XdrvMailbox.payload); target_pos_percent = ((Settings->shutter_options[index] & 1) && ((SRC_MQTT != TasmotaGlobal.last_source) - || (SRC_SERIAL != TasmotaGlobal.last_source) - || (SRC_WEBCOMMAND != TasmotaGlobal.last_source) + && (SRC_SERIAL != TasmotaGlobal.last_source) + && (SRC_WEBGUI != TasmotaGlobal.last_source) + && (SRC_WEBCOMMAND != TasmotaGlobal.last_source) )) ? 100 - target_pos_percent : target_pos_percent; if (XdrvMailbox.payload != -99) { diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index c5255c563..29ffe43f4 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -1340,8 +1340,9 @@ void CmndShutterPosition(void) int8_t target_pos_percent = (XdrvMailbox.payload < 0) ? (XdrvMailbox.payload == -99 ? ShutterRealToPercentPosition(Shutter[index].real_position, index) : 0) : ((XdrvMailbox.payload > 100) ? 100 : XdrvMailbox.payload); target_pos_percent = ((Settings->shutter_options[index] & 1) && ((SRC_MQTT != TasmotaGlobal.last_source) - || (SRC_SERIAL != TasmotaGlobal.last_source) - || (SRC_WEBCOMMAND != TasmotaGlobal.last_source) + && (SRC_SERIAL != TasmotaGlobal.last_source) + && (SRC_WEBGUI != TasmotaGlobal.last_source) + && (SRC_WEBCOMMAND != TasmotaGlobal.last_source) )) ? 100 - target_pos_percent : target_pos_percent; if (XdrvMailbox.payload != -99) { //target_pos_percent = (Settings->shutter_options[index] & 1) ? 100 - target_pos_percent : target_pos_percent;