mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Fix issue where stop command is issued when seeking the current tilt position #239
This commit is contained in:
parent
1b35c7d835
commit
01895d0ec5
7 changed files with 89 additions and 65 deletions
|
|
@ -2702,6 +2702,7 @@ void SomfyShade::moveToTiltTarget(float target) {
|
|||
else if(target > this->currentTiltPos)
|
||||
cmd = somfy_commands::Down;
|
||||
if(target >= 0.0f && target <= 100.0f) {
|
||||
// Only send a command if the lift is not moving.
|
||||
if(this->currentPos == this->target || this->tiltType == tilt_types::tiltmotor) {
|
||||
if(cmd != somfy_commands::My) {
|
||||
Serial.print("Moving Tilt to ");
|
||||
|
|
@ -2712,12 +2713,12 @@ void SomfyShade::moveToTiltTarget(float target) {
|
|||
Serial.println(translateSomfyCommand(cmd));
|
||||
SomfyRemote::sendCommand(cmd, this->tiltType == tilt_types::tiltmotor ? TILT_REPEATS : this->repeats);
|
||||
}
|
||||
else
|
||||
SomfyRemote::sendCommand(cmd, this->repeats);
|
||||
// If the blind is currently moving then the command to stop it
|
||||
// will occur on its own when the tilt target is set.
|
||||
}
|
||||
this->p_tiltTarget(target);
|
||||
}
|
||||
this->settingTiltPos = true;
|
||||
if(cmd != somfy_commands::My) this->settingTiltPos = true;
|
||||
}
|
||||
void SomfyShade::moveToTarget(float pos, float tilt) {
|
||||
somfy_commands cmd = somfy_commands::My;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue