From cac56f4ba818f72d8fcc52bb0623d91b3790d7cb Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Wed, 25 Dec 2024 04:59:59 -0500 Subject: [PATCH] ESP-IDF Robot ESP NOW --- ESP-IDF_Robot/main/espnow_config.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ESP-IDF_Robot/main/espnow_config.h b/ESP-IDF_Robot/main/espnow_config.h index a8c251963..8e97f5461 100644 --- a/ESP-IDF_Robot/main/espnow_config.h +++ b/ESP-IDF_Robot/main/espnow_config.h @@ -49,14 +49,15 @@ enum { /* User defined fields of ESPNOW data struct. */ 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. + 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. uint8_t mtr_a_pwm; uint8_t mtr_b_pwm; + bool lights; // Lights ON/OFF } __attribute__((packed)) espnow_data_t; /* Parameters of sending ESPNOW data. */