mirror of https://github.com/arendst/Tasmota.git
Additional limit check on tilt changes (#18364)
* limit check on tilt position * limit check on tilt changes
This commit is contained in:
parent
545c6a3511
commit
86be6c8a3d
|
@ -1428,7 +1428,7 @@ void CmndShutterPosition(void)
|
|||
|
||||
//override tiltposition if explicit set (shutterbutton)
|
||||
if (Shutter[index].tilt_target_pos_override != -128) {
|
||||
Shutter[index].tilt_target_pos = Shutter[index].tilt_target_pos_override;
|
||||
Shutter[index].tilt_target_pos = tmin(tmax( Shutter[index].tilt_config[0],Shutter[index].tilt_target_pos_override ), Shutter[index].tilt_config[1]);
|
||||
Shutter[index].tilt_target_pos_override = -128;
|
||||
}
|
||||
|
||||
|
|
|
@ -1343,7 +1343,7 @@ void CmndShutterPosition(void)
|
|||
|
||||
// manual override of tiltposition
|
||||
if (Shutter[index].tilt_target_pos_override != -128) {
|
||||
Shutter[index].tilt_target_pos = Shutter[index].tilt_target_pos_override;
|
||||
Shutter[index].tilt_target_pos = tmin(tmax( Shutter[index].tilt_config[0],Shutter[index].tilt_target_pos_override ), Shutter[index].tilt_config[1]);
|
||||
Shutter[index].tilt_target_pos_override = -128;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue