try to fix invalid peer

This commit is contained in:
NP v/d Spek 2024-11-18 21:20:13 +01:00
parent 16586ae50d
commit e650a617c1

View file

@ -359,7 +359,7 @@ bool ESPNowComponent::send(ESPNowPacket packet) {
void ESPNowComponent::on_data_sent(const uint8_t *mac_addr, esp_now_send_status_t status) {
ESPNowPacket packet; // NOLINT
uint64_t peer;
uint64_t peer = 0;
memcpy((void *) &peer, mac_addr, 6);
if (xQueuePeek(ESPNowComponent::static_->send_queue_, (void *) &packet, 10 / portTICK_PERIOD_MS) == pdTRUE) {
if (packet.peer != peer) {