Version 1.3.1

Fixed an error of the unsupported WiFi protocol bitmap for ESP32-C2 and ESP8266.
This commit is contained in:
Alexey Zholtikov 2025-02-15 09:47:24 +03:00
parent f4ecd08e45
commit af7fa204e1
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
1.3.0 1.3.1

View File

@ -73,7 +73,11 @@ esp_err_t zh_espnow_init(const zh_espnow_init_config_t *config)
ESP_LOGW(TAG, "ESP-NOW initialization warning. The device is connected to the router. Channel %d will be used for ESP-NOW.", prim); ESP_LOGW(TAG, "ESP-NOW initialization warning. The device is connected to the router. Channel %d will be used for ESP-NOW.", prim);
} }
} }
#if defined CONFIG_IDF_TARGET_ESP8266 || CONFIG_IDF_TARGET_ESP32C2
esp_wifi_set_protocol(_init_config.wifi_interface, WIFI_PROTOCOL_11B);
#else
esp_wifi_set_protocol(_init_config.wifi_interface, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_LR); esp_wifi_set_protocol(_init_config.wifi_interface, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_LR);
#endif
_event_group_handle = xEventGroupCreate(); _event_group_handle = xEventGroupCreate();
_queue_handle = xQueueCreate(_init_config.queue_size, sizeof(_queue_t)); _queue_handle = xQueueCreate(_init_config.queue_size, sizeof(_queue_t));
if (_init_config.battery_mode == false) if (_init_config.battery_mode == false)