fixes compilation error with esp-idf

This commit is contained in:
klaudiusz223 2023-02-04 19:16:43 +01:00
parent 791a53b279
commit edf6c9e5f2

View file

@ -139,7 +139,7 @@ void TimeBasedTiltCover::loop() {
this->last_publish_time_= now; this->last_publish_time_= now;
if ( this->recalibration_time_ > 0 && if ( this->recalibration_time_ > 0 &&
((this->position == COVER_CLOSED && (tilt_time == 0 || this->tilt == COVER_CLOSED) || (((this->position == COVER_CLOSED && (tilt_time == 0 || this->tilt == COVER_CLOSED)) ||
(this->position == COVER_OPEN && (tilt_time == 0 || this->tilt == COVER_OPEN))))) (this->position == COVER_OPEN && (tilt_time == 0 || this->tilt == COVER_OPEN)))))
{ {
this->fsm_state_ = STATE_CALIBRATING; this->fsm_state_ = STATE_CALIBRATING;
@ -176,8 +176,8 @@ void TimeBasedTiltCover::loop() {
this->last_publish_time_= now; this->last_publish_time_= now;
if ( this->recalibration_time_ > 0 && if ( this->recalibration_time_ > 0 &&
((this->position == COVER_CLOSED && ( tilt_time == 0 || this->tilt == COVER_CLOSED) || (((this->position == COVER_CLOSED && (tilt_time == 0 || this->tilt == COVER_CLOSED)) ||
(this->position == COVER_OPEN && ( tilt_time == 0 || this->tilt == COVER_OPEN))))) (this->position == COVER_OPEN && (tilt_time == 0 || this->tilt == COVER_OPEN)))))
{ {
this->fsm_state_ = STATE_CALIBRATING; this->fsm_state_ = STATE_CALIBRATING;
this->publish_state(false); this->publish_state(false);