Nextion - Do not refresh sensors while updating (#6566)

This commit is contained in:
Edward Firmo
2024-04-18 02:05:37 +02:00
committed by GitHub
parent 5a093acbf5
commit 39deb89108
7 changed files with 32 additions and 8 deletions
@@ -30,7 +30,7 @@ void NextionSensor::add_to_wave_buffer(float state) {
}
void NextionSensor::update() {
if (!this->nextion_->is_setup())
if (!this->nextion_->is_setup() || this->nextion_->is_updating())
return;
if (this->wave_chan_id_ == UINT8_MAX) {
@@ -45,7 +45,7 @@ void NextionSensor::update() {
}
void NextionSensor::set_state(float state, bool publish, bool send_to_nextion) {
if (!this->nextion_->is_setup())
if (!this->nextion_->is_setup() || this->nextion_->is_updating())
return;
if (std::isnan(state))