mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 17:54:13 +01:00
Update ebyte_lora.cpp
This commit is contained in:
parent
5be241d1c0
commit
1f2c779bd5
1 changed files with 1 additions and 2 deletions
|
@ -350,9 +350,8 @@ void EbyteLoraComponent::loop() {
|
||||||
}
|
}
|
||||||
if (data[0] == PROGRAM_CONF) {
|
if (data[0] == PROGRAM_CONF) {
|
||||||
ESP_LOGD(TAG, "GOT PROGRAM_CONF");
|
ESP_LOGD(TAG, "GOT PROGRAM_CONF");
|
||||||
auto *sbuff = reinterpret_cast<const RegisterConfig *>(&data);
|
|
||||||
memset(&this->config, 0, sizeof(RegisterConfig));
|
memset(&this->config, 0, sizeof(RegisterConfig));
|
||||||
memcpy(&this->config, sbuff, sbuff->length);
|
memcpy(&this->config, &data[0], sizeof(RegisterConfig));
|
||||||
set_mode_(NORMAL);
|
set_mode_(NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue