Allow tilt target changes for integrated tilt when blind is in transit.

This commit is contained in:
Robert Strouse 2023-05-31 09:58:19 -07:00
parent 3ee5bb45c8
commit 30473e16d3
2 changed files with 12 additions and 10 deletions

View file

@ -1343,17 +1343,19 @@ void SomfyShade::moveToTiltTarget(float target) {
else if(target > this->currentTiltPos) else if(target > this->currentTiltPos)
cmd = somfy_commands::Down; cmd = somfy_commands::Down;
if(target >= 0.0f && target <= 100.0f) { if(target >= 0.0f && target <= 100.0f) {
if(cmd != somfy_commands::My) { if(this->currentPos == this->target || this->tiltType == tilt_types::tiltmotor) {
Serial.print("Moving Tilt to "); if(cmd != somfy_commands::My) {
Serial.print(target); Serial.print("Moving Tilt to ");
Serial.print("% from "); Serial.print(target);
Serial.print(this->currentTiltPos); Serial.print("% from ");
Serial.print("% using "); Serial.print(this->currentTiltPos);
Serial.println(translateSomfyCommand(cmd)); Serial.print("% using ");
SomfyRemote::sendCommand(cmd, this->tiltType == tilt_types::tiltmotor ? TILT_REPEATS : 1); Serial.println(translateSomfyCommand(cmd));
SomfyRemote::sendCommand(cmd, this->tiltType == tilt_types::tiltmotor ? TILT_REPEATS : 1);
}
else
SomfyRemote::sendCommand(cmd);
} }
else
SomfyRemote::sendCommand(cmd);
this->tiltTarget = target; this->tiltTarget = target;
} }
this->settingTiltPos = true; this->settingTiltPos = true;

Binary file not shown.