This commit is contained in:
2025-08-11 00:38:44 -04:00
parent 2b959a292a
commit b30f2e3130

View File

@@ -98,6 +98,12 @@ static void update_pwm (int rc_x, int rc_y) {
// CONTINOUS UPDATE // CONTINOUS UPDATE
int x_val = x; int x_val = x;
int y_val = y; int y_val = y;
int x_centered = x_val - 2048;
int y_centered = x_val - 2048;
int motor_a_dir = y_centered >= 0 ? 1 : -1;
int motor_b_dir = y_centered >= 0 ? 1 : -1;
int motor_a_speed = abs(y_centered) * 255 / 2048;
int motor_a_speed = abs(y_centered) * 255 / 2048;
// Turn Left // Turn Left