mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
code cleaning
This commit is contained in:
parent
44b4dde121
commit
6da178091b
1 changed files with 1 additions and 11 deletions
|
@ -172,7 +172,6 @@ void ModemComponent::loop() {
|
||||||
|
|
||||||
// The state of network connection established
|
// The state of network connection established
|
||||||
case ModemComponentState::CONNECTED:
|
case ModemComponentState::CONNECTED:
|
||||||
// ESP_LOGI(TAG, "voltage %dV.", get_modem_voltage() / 1000);
|
|
||||||
if (esp_netif_is_netif_up(this->modem_netif_)) {
|
if (esp_netif_is_netif_up(this->modem_netif_)) {
|
||||||
ESP_LOGD(TAG, "esp_netif_is_netif_UP");
|
ESP_LOGD(TAG, "esp_netif_is_netif_UP");
|
||||||
} else {
|
} else {
|
||||||
|
@ -313,16 +312,7 @@ int ModemComponent::get_rssi() {
|
||||||
return rssi;
|
return rssi;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ModemComponent::get_modem_voltage() {
|
float ModemComponent::get_setup_priority() const { return setup_priority::MODEM; }
|
||||||
int voltage = 0, bcs = 0, bcl = 0;
|
|
||||||
esp_modem::command_result errr = this->dce->get_battery_status(voltage, bcs, bcl);
|
|
||||||
if (errr != esp_modem::command_result::OK) {
|
|
||||||
ESP_LOGE(TAG, "get_battery_status failed with");
|
|
||||||
}
|
|
||||||
return voltage;
|
|
||||||
}
|
|
||||||
|
|
||||||
float ModemComponent::get_setup_priority() const { return setup_priority::WIFI; }
|
|
||||||
|
|
||||||
bool ModemComponent::can_proceed() { return this->is_connected(); }
|
bool ModemComponent::can_proceed() { return this->is_connected(); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue