mirror of
https://github.com/esphome/esphome.git
synced 2025-02-25 20:42:25 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
fd61c32c22
commit
8989c307d8
1 changed files with 2 additions and 3 deletions
|
@ -301,7 +301,6 @@ void EbyteLoraComponent::get_current_config_() {
|
||||||
if (this->get_mode_() != CONFIGURATION) {
|
if (this->get_mode_() != CONFIGURATION) {
|
||||||
ESP_LOGD(TAG, "Mode not set right requesting that and returning %u", this->get_mode_());
|
ESP_LOGD(TAG, "Mode not set right requesting that and returning %u", this->get_mode_());
|
||||||
this->set_mode_(CONFIGURATION);
|
this->set_mode_(CONFIGURATION);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (this->can_send_message_("get_current_config_")) {
|
if (this->can_send_message_("get_current_config_")) {
|
||||||
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
|
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
|
||||||
|
@ -408,7 +407,8 @@ void EbyteLoraComponent::update() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->config_mode_ != NORMAL) {
|
// only make it normal when config is set
|
||||||
|
if (this->current_config_.config_set != 0 && this->config_mode_ != NORMAL) {
|
||||||
this->config_mode_ = this->get_mode_();
|
this->config_mode_ = this->get_mode_();
|
||||||
|
|
||||||
if (this->config_mode_ != NORMAL) {
|
if (this->config_mode_ != NORMAL) {
|
||||||
|
@ -504,7 +504,6 @@ void EbyteLoraComponent::process_(std::vector<uint8_t> data) {
|
||||||
if (data.size() - i < sensor_name_length) {
|
if (data.size() - i < sensor_name_length) {
|
||||||
return ESP_LOGV(TAG, "Name length of %u not available", sensor_name_length);
|
return ESP_LOGV(TAG, "Name length of %u not available", sensor_name_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the memory cleared and set
|
// get the memory cleared and set
|
||||||
memset(sensor_name, 0, sizeof sensor_name);
|
memset(sensor_name, 0, sizeof sensor_name);
|
||||||
for (size_t s = 0; s < sensor_name_length; s++) {
|
for (size_t s = 0; s < sensor_name_length; s++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue