Update ebyte_lora_component.cpp

This commit is contained in:
Daniël Koek 2024-10-04 15:16:47 +01:00
parent 7b61c45aa5
commit e84a6c40fc

View file

@ -297,8 +297,11 @@ void EbyteLoraComponent::setup() {
ESP_LOGD(TAG, "Setup success");
}
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");
this->set_mode_(CONFIGURATION);
return;
}
if (this->can_send_message_()) {
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
this->write_array(data, sizeof(data));
@ -349,7 +352,7 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
if (this->config_mode_ == MODE_INIT) {
ESP_LOGD(TAG, "Very first time setting the mode, going to ignore device busy state");
} else {
ESP_LOGD(TAG, "Device busy lets wait");
ESP_LOGD(TAG, "Device busy lets wait, current mode is %u", this->config_mode_);
return;
}
}