1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-03 17:28:16 +00:00

fixed typo

This commit is contained in:
NP v/d Spek 2024-12-05 17:15:11 +01:00
parent abfc0256e8
commit d042bfabaa

View File

@ -284,7 +284,7 @@ esp_err_t ESPNowComponent::add_peer(uint64_t peer, int8_t channel) {
result = esp_now_get_peer((const uint8_t *) &peer, &peer_info); result = esp_now_get_peer((const uint8_t *) &peer, &peer_info);
if (result == ESP_OK) { if (result == ESP_OK) {
peer_info.channel = (channel = -1) ? this->wifi_channel_ : channel; peer_info.channel = (channel = -1) ? this->wifi_channel_ : channel;
result = esp_now_mod_peer((uint8_t *) &peer); result = esp_now_mod_peer(&peer_info);
} }
} else { } else {
memset(&peer_info, 0, sizeof(esp_now_peer_info_t)); memset(&peer_info, 0, sizeof(esp_now_peer_info_t));