From eb37215e9f941545878fca66cb675e1635c4ae4a Mon Sep 17 00:00:00 2001 From: oarcher Date: Wed, 17 Jul 2024 14:41:27 +0200 Subject: [PATCH] lint --- esphome/components/modem/modem_component.cpp | 6 +++--- esphome/components/modem/modem_component.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/modem/modem_component.cpp b/esphome/components/modem/modem_component.cpp index 662e1a5696..5d7d3dc211 100644 --- a/esphome/components/modem/modem_component.cpp +++ b/esphome/components/modem/modem_component.cpp @@ -206,7 +206,7 @@ void ModemComponent::start_connect_() { if (!this->pin_code_.empty()) { ESP_LOGV(TAG, "Set pin code: %s", this->pin_code_.c_str()); this->dce->set_pin(this->pin_code_); - delay(this->command_delay); // NOLINT + delay(this->command_delay_); // NOLINT } if (this->dce->read_pin(pin_ok) == command_result::OK && !pin_ok) { ESP_LOGE(TAG, "Invalid PIN"); @@ -230,7 +230,7 @@ void ModemComponent::start_connect_() { // send initial AT commands from yaml for (const auto &cmd : this->init_at_commands_) { - std::string result = this->send_at(cmd.c_str()); + std::string result = this->send_at(cmd); if (result == "ERROR") { ESP_LOGE(TAG, "Error while executing 'init_at' '%s' command", cmd.c_str()); } else { @@ -342,7 +342,7 @@ std::string ModemComponent::send_at(const std::string &cmd) { std::string result; bool status; ESP_LOGV(TAG, "Sending command: %s", cmd.c_str()); - status = this->dce->at(cmd, result, this->command_delay) == esp_modem::command_result::OK; + status = this->dce->at(cmd, result, this->command_delay_) == esp_modem::command_result::OK; ESP_LOGV(TAG, "Result for command %s: %s (status %d)", cmd.c_str(), result.c_str(), status); if (!status) { result = "ERROR"; diff --git a/esphome/components/modem/modem_component.h b/esphome/components/modem/modem_component.h index 0bc2c06e73..d5a44fa646 100644 --- a/esphome/components/modem/modem_component.h +++ b/esphome/components/modem/modem_component.h @@ -89,7 +89,7 @@ class ModemComponent : public Component { static void got_ip_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data); void dump_connect_params_(); std::string use_address_; - uint32_t command_delay = 500; + uint32_t command_delay_ = 500; CallbackManager on_not_responding_callback_; };