This commit is contained in:
2025-01-03 19:32:51 -05:00
parent 698bf9d027
commit 6368154d15

View File

@@ -12,13 +12,13 @@ typedef struct {
uint8_t motor2_rpm_pcm; uint8_t motor2_rpm_pcm;
uint8_t motor3_rpm_pcm; uint8_t motor3_rpm_pcm;
uint8_t motor4_rpm_pcm; uint8_t motor4_rpm_pcm;
} __attribute__((packed)) sensors_data_t; } __attribute__((packed)) data_t;
typedef struct { typedef struct {
int len; // Length of ESPNOW data to be sent, unit: byte. int len; // Length of ESPNOW data to be sent, unit: byte.
uint8_t *buffer; // Buffer; pointer to the data struct. uint8_t *buffer; // Buffer; pointer to the data struct.
uint8_t dest_mac[ESP_NOW_ETH_ALEN]; // MAC address of destination device. uint8_t dest_mac[ESP_NOW_ETH_ALEN]; // MAC address of destination device.
} espnow_data_packet_t; } espnow_data_encapsulation_t;
/* WiFi should start before using ESPNOW */ /* WiFi should start before using ESPNOW */
static void wifi_init(void) static void wifi_init(void)