From b37e4a161bb4060c2c739135d4ea54a023249794 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Fri, 3 Jan 2025 01:03:39 -0500 Subject: [PATCH] ESP32-C3 RC --- ESP-IDF_Robot_RC/main/espnow_example.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ESP-IDF_Robot_RC/main/espnow_example.h b/ESP-IDF_Robot_RC/main/espnow_example.h index 4a1d63da0..563730bec 100755 --- a/ESP-IDF_Robot_RC/main/espnow_example.h +++ b/ESP-IDF_Robot_RC/main/espnow_example.h @@ -66,6 +66,15 @@ typedef struct { uint8_t payload[2]; // Real payload of ESPNOW data. } __attribute__((packed)) example_espnow_data_t; +typedef struct { + uint8_t type; // Broadcast or unicast ESPNOW data. + uint8_t state; // Indicate that if has received broadcast ESPNOW data or not. + uint16_t seq_num; // Sequence number of ESPNOW data. + uint16_t crc; // CRC16 value of ESPNOW data. + uint32_t magic; // Magic number which is used to determine which device to send unicast ESPNOW data. + uint8_t payload[2]; // Real payload of ESPNOW data. +} __attribute__((packed)) sensors_data_t; + /* Parameters of sending ESPNOW data. */ typedef struct { bool unicast; // Send unicast ESPNOW data.