mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
Update xdrv_27_shutter.ino
This commit is contained in:
parent
0cc6f85634
commit
49eecf8143
@ -558,7 +558,6 @@ void ShutterUpdatePosition(void)
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
Settings->shutter_tilt_pos[i] = Shutter[i].tilt_real_pos;
|
Settings->shutter_tilt_pos[i] = Shutter[i].tilt_real_pos;
|
||||||
Shutter[i].tiltmoving = 0;
|
|
||||||
}
|
}
|
||||||
ShutterLogPos(i);
|
ShutterLogPos(i);
|
||||||
|
|
||||||
@ -1151,8 +1150,10 @@ void CmndShutterPosition(void)
|
|||||||
int8_t new_shutterdirection;
|
int8_t new_shutterdirection;
|
||||||
if (abs(Shutter[index].target_position - Shutter[index].real_position ) > Shutter[index].min_realPositionChange) {
|
if (abs(Shutter[index].target_position - Shutter[index].real_position ) > Shutter[index].min_realPositionChange) {
|
||||||
new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1;
|
new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1;
|
||||||
|
Shutter[i].tiltmoving = 0;
|
||||||
} else {
|
} else {
|
||||||
new_shutterdirection = Shutter[index].tilt_real_pos < Shutter[index].tilt_target_pos ? 1 : -1;
|
new_shutterdirection = Shutter[index].tilt_real_pos < Shutter[index].tilt_target_pos ? 1 : -1;
|
||||||
|
Shutter[i].tiltmoving = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Shutter[index].direction == -new_shutterdirection) {
|
if (Shutter[index].direction == -new_shutterdirection) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user