mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 16:47:57 +01:00
Time Based Cover: Fixed apparent race condition on ESP32 chips (#1984)
This commit is contained in:
parent
9e400a7857
commit
86ac7f3a59
@ -115,13 +115,13 @@ void TimeBasedCover::start_direction_(CoverOperation dir) {
|
||||
|
||||
this->current_operation = dir;
|
||||
|
||||
this->stop_prev_trigger_();
|
||||
trig->trigger();
|
||||
this->prev_command_trigger_ = trig;
|
||||
|
||||
const uint32_t now = millis();
|
||||
this->start_dir_time_ = now;
|
||||
this->last_recompute_time_ = now;
|
||||
|
||||
this->stop_prev_trigger_();
|
||||
trig->trigger();
|
||||
this->prev_command_trigger_ = trig;
|
||||
}
|
||||
void TimeBasedCover::recompute_position_() {
|
||||
if (this->current_operation == COVER_OPERATION_IDLE)
|
||||
|
Loading…
Reference in New Issue
Block a user