diff --git a/ESP-IDF_Robot/main/rc.h b/ESP-IDF_Robot/main/rc.h index d95df7efd..7e8948724 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -118,10 +118,18 @@ static void update_pwm (int rc_x, int rc_y) { // Pass PWM values to the proper DC motors depending on the joystick y-axis position // Forward if (y_val > y_centered) { - m. + m.motor1_rpm_pcm = motor_a_speed; + m.motor2_rpm_pcm = motor_b_speed; + m.motor3_rpm_pcm = 0; + m.motor4_rpm_pcm = 0; } // Reverse - if (y_val < y_centered) {} + if (y_val < y_centered) { + m.motor1_rpm_pcm = motor_a_speed; + m.motor2_rpm_pcm = motor_b_speed; + m.motor3_rpm_pcm = 0; + m.motor4_rpm_pcm = 0; + } /*