Skip to content

Commit

Permalink
Clear UART read buffer before sending next command (#6200)
Browse files Browse the repository at this point in the history
  • Loading branch information
fototakas committed Feb 20, 2024
1 parent 2948d87 commit 1f432ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions esphome/components/fingerprint_grow/fingerprint_grow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ void FingerprintGrowComponent::aura_led_control(uint8_t state, uint8_t speed, ui
}

uint8_t FingerprintGrowComponent::send_command_() {
while (this->available())
this->read();
this->write((uint8_t) (START_CODE >> 8));
this->write((uint8_t) (START_CODE & 0xFF));
this->write(this->address_[0]);
Expand Down

0 comments on commit 1f432ec

Please sign in to comment.