This commit is contained in:
Daniël Koek 2024-04-26 15:22:17 +01:00
parent 77a2e965c5
commit 08d57c1266
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ namespace ebyte_lora {
static const uint8_t SWITCH_PUSH = 0x55; static const uint8_t SWITCH_PUSH = 0x55;
static const uint8_t SWITCH_INFO = 0x66; static const uint8_t SWITCH_INFO = 0x66;
static const uint8_t PROGRAM_CONF = 0xC1; static const uint8_t PROGRAM_CONF = 0xC1;
bool EbyteLoraComponent::check_config() { bool EbyteLoraComponent::check_config_() {
bool success = true; bool success = true;
if (this->current_config_.addh != this->expected_config_.addh) { if (this->current_config_.addh != this->expected_config_.addh) {
ESP_LOGD(TAG, "addh was not set right"); ESP_LOGD(TAG, "addh was not set right");
@ -63,7 +63,7 @@ void EbyteLoraComponent::update() {
this->get_current_config_(); this->get_current_config_();
return; return;
} else { } else {
if (!this->check_config()) { if (!this->check_config_()) {
ESP_LOGD(TAG, "Config is not right, have to do something about that!"); ESP_LOGD(TAG, "Config is not right, have to do something about that!");
} }
} }

View file

@ -54,7 +54,7 @@ class EbyteLoraComponent : public PollingComponent, public uart::UARTDevice {
// checks the aux port to see if it is done setting // checks the aux port to see if it is done setting
void setup_wait_response_(uint32_t timeout = 1000); void setup_wait_response_(uint32_t timeout = 1000);
bool can_send_message_(); bool can_send_message_();
bool check_config(); bool check_config_();
void get_current_config_(); void get_current_config_();
void send_switch_push_(uint8_t pin, bool value); void send_switch_push_(uint8_t pin, bool value);
void send_switch_info_(); void send_switch_info_();