mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 11:26:39 +00:00
[espnow] Don't throttle ESP-NOW RX when deep_sleep is present (#17240)
This commit is contained in:
@@ -28,9 +28,6 @@ namespace esphome::espnow {
|
|||||||
|
|
||||||
static constexpr const char *TAG = "espnow";
|
static constexpr const char *TAG = "espnow";
|
||||||
|
|
||||||
static const esp_err_t CONFIG_ESPNOW_WAKE_WINDOW = 50;
|
|
||||||
static const esp_err_t CONFIG_ESPNOW_WAKE_INTERVAL = 100;
|
|
||||||
|
|
||||||
ESPNowComponent *global_esp_now = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
ESPNowComponent *global_esp_now = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||||
|
|
||||||
static const LogString *espnow_error_to_str(esp_err_t error) {
|
static const LogString *espnow_error_to_str(esp_err_t error) {
|
||||||
@@ -204,11 +201,6 @@ void ESPNowComponent::enable_() {
|
|||||||
|
|
||||||
esp_wifi_get_mac(WIFI_IF_STA, this->own_address_);
|
esp_wifi_get_mac(WIFI_IF_STA, this->own_address_);
|
||||||
|
|
||||||
#ifdef USE_DEEP_SLEEP
|
|
||||||
esp_now_set_wake_window(CONFIG_ESPNOW_WAKE_WINDOW);
|
|
||||||
esp_wifi_connectionless_module_set_wake_interval(CONFIG_ESPNOW_WAKE_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
this->state_ = ESPNOW_STATE_ENABLED;
|
this->state_ = ESPNOW_STATE_ENABLED;
|
||||||
|
|
||||||
for (auto peer : this->peers_) {
|
for (auto peer : this->peers_) {
|
||||||
|
|||||||
Reference in New Issue
Block a user