ESP-IDF Robot ESP NOW

This commit is contained in:
2024-12-24 20:46:40 -05:00
parent 30fec02555
commit 08baf2f34b

View File

@@ -330,6 +330,7 @@ void espnow_data_prepare(espnow_send_param_t *send_param) {
buf->magic = send_param->magic; buf->magic = send_param->magic;
/* Fill all remaining bytes after the data with random values */ /* Fill all remaining bytes after the data with random values */
esp_fill_random(buf->payload, send_param->len - sizeof(espnow_data_t)); esp_fill_random(buf->payload, send_param->len - sizeof(espnow_data_t));
ESP_LOGI();
buf->crc = esp_crc16_le(UINT16_MAX, (uint8_t const *)buf, send_param->len); buf->crc = esp_crc16_le(UINT16_MAX, (uint8_t const *)buf, send_param->len);
} }