File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
tasmota/tasmota_xdrv_driver Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -1868,12 +1868,10 @@ void CmndShutterPosition(void)
18681868 }
18691869
18701870 int8_t target_pos_percent = (XdrvMailbox.payload < 0 ) ? (XdrvMailbox.payload == -99 ? ShutterRealToPercentPosition (Shutter[index].real_position , index) : 0 ) : ((XdrvMailbox.payload > 100 ) ? 100 : XdrvMailbox.payload );
1871- target_pos_percent = ((ShutterSettings.shutter_options [index] & 1 ) && ((SRC_MQTT != TasmotaGlobal.last_source ) // 1
1872- && (SRC_SERIAL != TasmotaGlobal.last_source ) // 6
1873- && (SRC_WEBGUI != TasmotaGlobal.last_source ) // 7
1874- && (SRC_WEBCOMMAND != TasmotaGlobal.last_source ) // 8
1875- )) ? 100 - target_pos_percent : target_pos_percent;
1876-
1871+ target_pos_percent = ((ShutterSettings.shutter_options [index] & 1 ) && ( (SRC_SERIAL != TasmotaGlobal.last_source ) // 6
1872+ && (SRC_WEBGUI != TasmotaGlobal.last_source ) // 7
1873+ && (SRC_WEBCOMMAND != TasmotaGlobal.last_source ) // 8
1874+ )) ? 100 - target_pos_percent : target_pos_percent;
18771875 // if position is either 0 or 100 reset the tilt to avoid tilt moving at the end
18781876 if (target_pos_percent == 0 && ShutterRealToPercentPosition (Shutter[index].real_position , index) > 0 ) {Shutter[index].tilt_target_pos = Shutter[index].tilt_config [4 ];}
18791877 if (target_pos_percent == 100 && ShutterRealToPercentPosition (Shutter[index].real_position , index) < 100 ) {Shutter[index].tilt_target_pos = Shutter[index].tilt_config [3 ];}
Original file line number Diff line number Diff line change @@ -1332,11 +1332,10 @@ void CmndShutterPosition(void)
13321332 }
13331333
13341334 int8_t target_pos_percent = (XdrvMailbox.payload < 0 ) ? (XdrvMailbox.payload == -99 ? ShutterRealToPercentPosition (Shutter[index].real_position , index) : 0 ) : ((XdrvMailbox.payload > 100 ) ? 100 : XdrvMailbox.payload );
1335- target_pos_percent = ((Settings->shutter_options [index] & 1 ) && ((SRC_MQTT != TasmotaGlobal.last_source )
1336- && (SRC_SERIAL != TasmotaGlobal.last_source )
1337- && (SRC_WEBGUI != TasmotaGlobal.last_source )
1338- && (SRC_WEBCOMMAND != TasmotaGlobal.last_source )
1339- )) ? 100 - target_pos_percent : target_pos_percent;
1335+ target_pos_percent = ((Settings->shutter_options [index] & 1 ) && ( (SRC_SERIAL != TasmotaGlobal.last_source )
1336+ && (SRC_WEBGUI != TasmotaGlobal.last_source )
1337+ && (SRC_WEBCOMMAND != TasmotaGlobal.last_source )
1338+ )) ? 100 - target_pos_percent : target_pos_percent;
13401339
13411340 // if position is either 0 or 100 reset the tilt to avoid tilt moving at the end
13421341 if (target_pos_percent == 0 && ShutterRealToPercentPosition (Shutter[index].real_position , index) > 0 ) {Shutter[index].tilt_target_pos = Shutter[index].tilt_config [4 ];}
You can’t perform that action at this time.
0 commit comments