bug fix
This commit is contained in:
@@ -125,7 +125,7 @@ public class TeleopV3 extends LinearOpMode {
|
||||
//DRIVETRAIN:
|
||||
|
||||
drivetrain.drive(
|
||||
gamepad1.right_stick_y,
|
||||
-gamepad1.right_stick_y,
|
||||
gamepad1.right_stick_x,
|
||||
gamepad1.left_stick_x,
|
||||
gamepad1.left_trigger
|
||||
|
||||
@@ -37,6 +37,7 @@ public class Drivetrain {
|
||||
|
||||
x = x* 1.1; // Counteract imperfect strafing
|
||||
|
||||
|
||||
double denominator = Math.max(Math.abs(y) + Math.abs(x) + Math.abs(rx), 1);
|
||||
double frontLeftPower = (y + x + rx) / denominator;
|
||||
double backLeftPower = (y - x + rx) / denominator;
|
||||
|
||||
Reference in New Issue
Block a user