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 {