ESP-IDF Robot ESP NOW

This commit is contained in:
2024-12-25 03:29:43 -05:00
parent 3f641e112f
commit e30ffbef51

View File

@@ -314,8 +314,9 @@ int example_espnow_data_parse(uint8_t *data, uint16_t data_len, uint8_t *state,
crc_cal = esp_crc16_le(UINT16_MAX, (uint8_t const *)buf, data_len);
// Display received data.
ESP_LOGW(TAG, "Received data size: %d", data_len);
ESP_LOGW(TAG, "Saved value: %x", (uint8_t)buf->payload);
ESP_LOGW(TAG, "Payload: %x", (uint8_t)buf->payload);
ESP_LOGW(TAG, "payload[0] = %x", (uint8_t)buf->payload[0]);
ESP_LOGW(TAG, "payload[1] = %x", (uint8_t)buf->payload[1]);
if (crc_cal == crc) {
return buf->type;