From 33c4de2b61e6904410e1a76ec94e731f65a60abf Mon Sep 17 00:00:00 2001 From: Alexander B Date: Wed, 25 Jun 2025 03:14:55 -0400 Subject: [PATCH] directions --- ESP-IDF_Robot/main/rc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ESP-IDF_Robot/main/rc.h b/ESP-IDF_Robot/main/rc.h index 4a07627c4..2451d8f42 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -167,17 +167,17 @@ static void update_pwm (int rc_x, int rc_y) { m.motor3_rpm_pcm = 0; m.motor4_rpm_pcm = y; } - // DIAGONALLY FORWARD AND REVERSE - if ((x > 0) && (y > 0 && y < 500)) { + // DIAGONALLY FORWARD + if ((x > 7400) && (y > 7440)) { m.motor1_rpm_pcm = x; // left, forward - m.motor2_rpm_pcm = x; // right, forward - m.motor3_rpm_pcm = 0; + m.motor2_rpm_pcm = 0; // right, forward + m.motor3_rpm_pcm = x; m.motor4_rpm_pcm = 0; } else if ((x < 0) && (y > 0 && y < 500)) { m.motor1_rpm_pcm = 0; - m.motor2_rpm_pcm = 0; - m.motor3_rpm_pcm = -x; + m.motor2_rpm_pcm = -x; + m.motor3_rpm_pcm = 0; m.motor4_rpm_pcm = -x; } else {