mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Time Based Cover: Fixed apparent race condition on ESP32 chips (#1984)
This commit is contained in:
parent
9e400a7857
commit
86ac7f3a59
1 changed files with 4 additions and 4 deletions
|
@ -115,13 +115,13 @@ void TimeBasedCover::start_direction_(CoverOperation dir) {
|
||||||
|
|
||||||
this->current_operation = dir;
|
this->current_operation = dir;
|
||||||
|
|
||||||
this->stop_prev_trigger_();
|
|
||||||
trig->trigger();
|
|
||||||
this->prev_command_trigger_ = trig;
|
|
||||||
|
|
||||||
const uint32_t now = millis();
|
const uint32_t now = millis();
|
||||||
this->start_dir_time_ = now;
|
this->start_dir_time_ = now;
|
||||||
this->last_recompute_time_ = now;
|
this->last_recompute_time_ = now;
|
||||||
|
|
||||||
|
this->stop_prev_trigger_();
|
||||||
|
trig->trigger();
|
||||||
|
this->prev_command_trigger_ = trig;
|
||||||
}
|
}
|
||||||
void TimeBasedCover::recompute_position_() {
|
void TimeBasedCover::recompute_position_() {
|
||||||
if (this->current_operation == COVER_OPERATION_IDLE)
|
if (this->current_operation == COVER_OPERATION_IDLE)
|
||||||
|
|
Loading…
Reference in a new issue