diff --git a/src/Somfy.cpp b/src/Somfy.cpp index ce5b00d..8403aac 100644 --- a/src/Somfy.cpp +++ b/src/Somfy.cpp @@ -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(this->tiltTime/static_cast(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(this->upTime/static_cast(this->stepSize * this->lastFrame.stepSize)))))); } this->emitCommand(cmd, internal ? "internal" : "remote", frame.remoteAddress);