1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

Force braces around multi-line statements (#3094)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Oxan van Leeuwen
2022-01-24 20:56:36 +01:00
committed by GitHub
parent 6b27f2d2cf
commit 80d03a631e
125 changed files with 770 additions and 504 deletions

View File

@@ -737,9 +737,10 @@ void Nextion::process_nextion_commands_() {
for (size_t i = 0; i < this->nextion_queue_.size(); i++) {
NextionComponentBase *component = this->nextion_queue_[i]->component;
if (this->nextion_queue_[i]->queue_time + this->max_q_age_ms_ < ms) {
if (this->nextion_queue_[i]->queue_time == 0)
if (this->nextion_queue_[i]->queue_time == 0) {
ESP_LOGD(TAG, "Removing old queue type \"%s\" name \"%s\" queue_time 0",
component->get_queue_type_string().c_str(), component->get_variable_name().c_str());
}
if (component->get_variable_name() == "sleep_wake") {
this->is_sleeping_ = false;
@@ -873,9 +874,9 @@ uint16_t Nextion::recv_ret_string_(std::string &response, uint32_t timeout, bool
while ((timeout == 0 && this->available()) || millis() - start <= timeout) {
this->read_byte(&c);
if (c == 0xFF)
if (c == 0xFF) {
nr_of_ff_bytes++;
else {
} else {
nr_of_ff_bytes = 0;
ff_flag = false;
}