directions

This commit is contained in:
2025-06-25 03:14:55 -04:00
parent 520b3546e2
commit 33c4de2b61

View File

@@ -167,17 +167,17 @@ static void update_pwm (int rc_x, int rc_y) {
m.motor3_rpm_pcm = 0; m.motor3_rpm_pcm = 0;
m.motor4_rpm_pcm = y; m.motor4_rpm_pcm = y;
} }
// DIAGONALLY FORWARD AND REVERSE // DIAGONALLY FORWARD
if ((x > 0) && (y > 0 && y < 500)) { if ((x > 7400) && (y > 7440)) {
m.motor1_rpm_pcm = x; // left, forward m.motor1_rpm_pcm = x; // left, forward
m.motor2_rpm_pcm = x; // right, forward m.motor2_rpm_pcm = 0; // right, forward
m.motor3_rpm_pcm = 0; m.motor3_rpm_pcm = x;
m.motor4_rpm_pcm = 0; m.motor4_rpm_pcm = 0;
} }
else if ((x < 0) && (y > 0 && y < 500)) { else if ((x < 0) && (y > 0 && y < 500)) {
m.motor1_rpm_pcm = 0; m.motor1_rpm_pcm = 0;
m.motor2_rpm_pcm = 0; m.motor2_rpm_pcm = -x;
m.motor3_rpm_pcm = -x; m.motor3_rpm_pcm = 0;
m.motor4_rpm_pcm = -x; m.motor4_rpm_pcm = -x;
} }
else { else {