1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +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:
Igor Mammedov 2019-05-23 19:40:30 +02:00
parent 2f78308de0
commit 7786d1e9ec

View File

@ -51,7 +51,6 @@ void MHZ19Component::update() {
}
bool MHZ19Component::mhz19_write_command_(const uint8_t *command, uint8_t *response) {
this->flush();
this->write_array(command, MHZ19_REQUEST_LENGTH);
this->write_byte(mhz19_checksum(command));