mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Allow tilt target changes for integrated tilt when blind is in transit.
This commit is contained in:
parent
3ee5bb45c8
commit
30473e16d3
2 changed files with 12 additions and 10 deletions
22
Somfy.cpp
22
Somfy.cpp
|
|
@ -1343,17 +1343,19 @@ void SomfyShade::moveToTiltTarget(float target) {
|
|||
else if(target > this->currentTiltPos)
|
||||
cmd = somfy_commands::Down;
|
||||
if(target >= 0.0f && target <= 100.0f) {
|
||||
if(cmd != somfy_commands::My) {
|
||||
Serial.print("Moving Tilt to ");
|
||||
Serial.print(target);
|
||||
Serial.print("% from ");
|
||||
Serial.print(this->currentTiltPos);
|
||||
Serial.print("% using ");
|
||||
Serial.println(translateSomfyCommand(cmd));
|
||||
SomfyRemote::sendCommand(cmd, this->tiltType == tilt_types::tiltmotor ? TILT_REPEATS : 1);
|
||||
if(this->currentPos == this->target || this->tiltType == tilt_types::tiltmotor) {
|
||||
if(cmd != somfy_commands::My) {
|
||||
Serial.print("Moving Tilt to ");
|
||||
Serial.print(target);
|
||||
Serial.print("% from ");
|
||||
Serial.print(this->currentTiltPos);
|
||||
Serial.print("% using ");
|
||||
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->settingTiltPos = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue