From 4d3c0abb23c7f6073075d0f19a92c0f7df83e10b Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Thu, 2 Jan 2025 03:48:58 -0500 Subject: [PATCH] ESP32-C3 RC --- ESP-IDF_Robot/main/rc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESP-IDF_Robot/main/rc.h b/ESP-IDF_Robot/main/rc.h index ee42c251c..216347f82 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -81,8 +81,8 @@ static void rc_get_raw_data() { if ((x > 0 && x < 500) && (y > 500)) { ESP_LOGW("RC", "FORWARD"); //set_motor_pcm(&m.motor1_rpm_pcm, y); - m.motor1_rpm_pcm = y; - m.motor2_rpm_pcm = y; + m.motor1_rpm_pcm = y; // left, forward + m.motor2_rpm_pcm = y; // right, forward m.motor3_rpm_pcm = 0; m.motor4_rpm_pcm = 0; } @@ -97,7 +97,7 @@ static void rc_get_raw_data() { ESP_LOGW("RC", "LEFT"); m.motor1_rpm_pcm = -x; // left forward m.motor2_rpm_pcm = 0; - m.motor3_rpm_pcm = 0; // x ? + m.motor3_rpm_pcm = x; // x ? m.motor4_rpm_pcm = 0; } else if ((y < 0 && y > -200) && (x > 1000)) {