mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
04fd678f2a
commit
c77f45f4f2
1 changed files with 12 additions and 13 deletions
|
@ -422,21 +422,20 @@ void EbyteLoraComponent::update() {
|
|||
}
|
||||
}
|
||||
void EbyteLoraComponent::loop() {
|
||||
std::vector<uint8_t> data;
|
||||
if (!this->available())
|
||||
return;
|
||||
ESP_LOGD(TAG, "Reading serial");
|
||||
while (this->available()) {
|
||||
uint8_t c;
|
||||
this->read_byte(&c);
|
||||
data.push_back(c);
|
||||
if (this->available()) {
|
||||
std::vector<uint8_t> data;
|
||||
ESP_LOGD(TAG, "Reading serial");
|
||||
while (this->available()) {
|
||||
uint8_t c;
|
||||
this->read_byte(&c);
|
||||
data.push_back(c);
|
||||
}
|
||||
if (this->repeater_enabled_) {
|
||||
this->repeat_message_(data);
|
||||
}
|
||||
this->process_(data);
|
||||
}
|
||||
|
||||
if (this->repeater_enabled_) {
|
||||
this->repeat_message_(data);
|
||||
}
|
||||
this->process_(data);
|
||||
|
||||
if (this->resend_repeater_request_)
|
||||
this->request_repeater_info_();
|
||||
if (this->updated_) {
|
||||
|
|
Loading…
Reference in a new issue