mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +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() {
|
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_) {
|
||||||
|
|
Loading…
Reference in a new issue