Update ebyte_lora_component.cpp

This commit is contained in:
Daniël Koek 2024-10-11 10:54:17 +01:00
parent 04fd678f2a
commit c77f45f4f2

View file

@ -422,21 +422,20 @@ void EbyteLoraComponent::update() {
} }
} }
void EbyteLoraComponent::loop() { void EbyteLoraComponent::loop() {
std::vector<uint8_t> data; if (this->available()) {
if (!this->available()) std::vector<uint8_t> data;
return; ESP_LOGD(TAG, "Reading serial");
ESP_LOGD(TAG, "Reading serial"); while (this->available()) {
while (this->available()) { uint8_t c;
uint8_t c; this->read_byte(&c);
this->read_byte(&c); data.push_back(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_) if (this->resend_repeater_request_)
this->request_repeater_info_(); this->request_repeater_info_();
if (this->updated_) { if (this->updated_) {