This commit is contained in:
2026-01-30 19:07:47 -06:00
parent 61e47095f3
commit 8cce5448ca
2 changed files with 2 additions and 1 deletions

View File

@@ -125,7 +125,7 @@ public class TeleopV3 extends LinearOpMode {
//DRIVETRAIN: //DRIVETRAIN:
drivetrain.drive( drivetrain.drive(
gamepad1.right_stick_y, -gamepad1.right_stick_y,
gamepad1.right_stick_x, gamepad1.right_stick_x,
gamepad1.left_stick_x, gamepad1.left_stick_x,
gamepad1.left_trigger gamepad1.left_trigger

View File

@@ -37,6 +37,7 @@ public class Drivetrain {
x = x* 1.1; // Counteract imperfect strafing x = x* 1.1; // Counteract imperfect strafing
double denominator = Math.max(Math.abs(y) + Math.abs(x) + Math.abs(rx), 1); double denominator = Math.max(Math.abs(y) + Math.abs(x) + Math.abs(rx), 1);
double frontLeftPower = (y + x + rx) / denominator; double frontLeftPower = (y + x + rx) / denominator;
double backLeftPower = (y - x + rx) / denominator; double backLeftPower = (y - x + rx) / denominator;