ESP-NOW-Transmitter

This commit is contained in:
2025-06-17 11:47:17 -04:00
parent ab37302db8
commit 408cf762ac

View File

@@ -423,7 +423,7 @@ void sendData (void) {
//ESP_LOGI(TAG, "pcm 3, pcm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pcm, (uint8_t)buffer.motor4_rpm_pcm); //ESP_LOGI(TAG, "pcm 3, pcm 4 [ 0x%04X, 0x%04X ]", (uint8_t)buffer.motor3_rpm_pcm, (uint8_t)buffer.motor4_rpm_pcm);
// Call ESP-NOW function to send data (MAC address of receiver, pointer to the memory holding data & data length) // Call ESP-NOW function to send data (MAC address of receiver, pointer to the memory holding data & data length)
uint8_t result = esp_now_send(receiver_mac, &buffer, sizeof(buffer)); uint8_t result = esp_now_send(receiver_mac, (sensors_data_t*)buffer, sizeof(buffer));
// If status is NOT OK, display error message and error code (in hexadecimal). // If status is NOT OK, display error message and error code (in hexadecimal).
if (result != 0) { if (result != 0) {