Engage my position when only the tilt position will be changing.

This commit is contained in:
Robert Strouse 2023-04-26 10:07:23 -07:00
parent 2c036f664c
commit 169208025f
2 changed files with 7 additions and 1 deletions

View file

@ -1139,7 +1139,13 @@ void SomfyShade::setMyPosition(int8_t pos, int8_t tilt) {
}
void SomfyShade::moveToMyPosition() {
if(!this->isIdle()) return;
if(this->currentPos == this->myPos) return; // Nothing to see here since we are already here.
if(this->currentPos == this->myPos) {
if(this->tiltType != tilt_types::none) {
if(this->currentTiltPos == this->myTiltPos) return; // Nothing to see here since we are already here.
}
else
return;
}
Serial.print("Seeking my Position:");
Serial.print(this->myPos);
Serial.print("% ");