From e8efed9c548c0d1920f5bb47867f8d843a9108c7 Mon Sep 17 00:00:00 2001 From: Alexander B Date: Sat, 4 Jan 2025 23:22:29 -0500 Subject: [PATCH] RC --- ESP-IDF_Robot/main/blink_example_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ESP-IDF_Robot/main/blink_example_main.c b/ESP-IDF_Robot/main/blink_example_main.c index b3f682027..ff67b585c 100644 --- a/ESP-IDF_Robot/main/blink_example_main.c +++ b/ESP-IDF_Robot/main/blink_example_main.c @@ -159,6 +159,8 @@ typedef struct struct_message { uint8_t motor_a_pwm; } struct_message; +static int x = 0, y = 0; + uint8_t broadcastAddress[] = {}; struct_message controlData; esp_now_peer_info_t peerInfo; @@ -812,6 +814,8 @@ void onDataReceived (const uint8_t *mac_addr, const uint8_t *data, uint8_t data_ ESP_LOGI(TAG, "PCM 2: 0x%04X", buf.motor2_rpm_pcm); ESP_LOGI(TAG, "PCM 3: 0x%04X", buf.motor3_rpm_pcm); ESP_LOGI(TAG, "PCM 4: 0x%04X", buf.motor4_rpm_pcm); + x = buf.x_axis; + y = buf.y_axis; }