From dd7ad1b54e7cc85ab312b0bd9d5c836190710a43 Mon Sep 17 00:00:00 2001 From: Alexandre Bobkov Date: Wed, 6 Aug 2025 04:17:28 -0400 Subject: [PATCH] pwm --- 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 d5d7af484..8b35fbca4 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -122,9 +122,9 @@ static void update_pwm (int rc_x, int rc_y) { m.motor4_rpm_pcm = 0; } if ((y < 1500) && (y > 1500)) && (x < 8000) { - m.motor1_rpm_pcm = y - x; - m.motor2_rpm_pcm = 0; - m.motor3_rpm_pcm = -(y - x); + m.motor1_rpm_pcm = 0; + m.motor2_rpm_pcm = (y + x); + m.motor3_rpm_pcm = 0; m.motor4_rpm_pcm = 0; } // -------------