mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
mhz19: drop not needed flush() call
flush() is used to flush TX buffer, but there weren't anything written to TX yet, so it's pointless to call flush() so early. Remove unnecessary call. Signed-off-by: Igor Mammedov <imammedo@redhat.com>
This commit is contained in:
parent
6bdd0e7f6d
commit
fd6e49f94d
@ -51,7 +51,6 @@ void MHZ19Component::update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MHZ19Component::mhz19_write_command_(const uint8_t *command, uint8_t *response) {
|
bool MHZ19Component::mhz19_write_command_(const uint8_t *command, uint8_t *response) {
|
||||||
this->flush();
|
|
||||||
this->write_array(command, MHZ19_REQUEST_LENGTH);
|
this->write_array(command, MHZ19_REQUEST_LENGTH);
|
||||||
this->write_byte(mhz19_checksum(command));
|
this->write_byte(mhz19_checksum(command));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user