mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
fix: ignore a received StepUp for a shade with no up time
The lift StepUp checked downTime for 0 but divided by upTime, so a shade with an up time of 0 had its target sent to 0% instead of the step being ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d85b3d30c8
commit
4dd4a9872e
1 changed files with 1 additions and 1 deletions
|
|
@ -2019,7 +2019,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
this->p_tiltTarget(max(0.0f, this->currentTiltPos - (100.0f/(static_cast<float>(this->tiltTime/static_cast<float>(this->stepSize * this->lastFrame.stepSize))))));
|
||||
}
|
||||
else if(this->currentPos > 0.0f) {
|
||||
if(this->downTime == 0 || this->stepSize == 0) return;
|
||||
if(this->upTime == 0 || this->stepSize == 0) return;
|
||||
this->p_target(max(0.0f, this->currentPos - (100.0f/(static_cast<float>(this->upTime/static_cast<float>(this->stepSize * this->lastFrame.stepSize))))));
|
||||
}
|
||||
this->emitCommand(cmd, internal ? "internal" : "remote", frame.remoteAddress);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue