diff --git a/src/main/java/competition/subsystems/drive/DriveSubsystem.java b/src/main/java/competition/subsystems/drive/DriveSubsystem.java index b9066ba..4548edc 100644 --- a/src/main/java/competition/subsystems/drive/DriveSubsystem.java +++ b/src/main/java/competition/subsystems/drive/DriveSubsystem.java @@ -43,6 +43,7 @@ public void tankDrive(double leftPower, double rightPower) { // to // the value of leftPower: frontLeft.set(leftPower); + frontRight.set(rightPower); } @Override diff --git a/src/main/java/competition/subsystems/drive/commands/TankDriveWithJoysticksCommand.java b/src/main/java/competition/subsystems/drive/commands/TankDriveWithJoysticksCommand.java index 4ac1709..76c535a 100644 --- a/src/main/java/competition/subsystems/drive/commands/TankDriveWithJoysticksCommand.java +++ b/src/main/java/competition/subsystems/drive/commands/TankDriveWithJoysticksCommand.java @@ -34,13 +34,19 @@ public void execute() { // Get values from the joysticks: // Here's how to get how far the left joystick's Y-axis is pushed: double leftValue = operatorInterface.gamepad.getLeftVector().y; - // You'll need to get how far the RIGHT joystick's Y-axis is pushed as well. + double rightValue = operatorInterface.gamepad.getRightVector().y; + // You'll need to get how far the RIGHT joystick's Y-axis is pushed as well + returnVal(leftValue); + returnVal(rightValue); // Pass values into the DriveSubsystem so it can control motors: // right now, this just sends the left power to the left part of the drive. // You'll // need to give it a right power as well. - drive.tankDrive(leftValue, 0); + drive.tankDrive(leftValue, rightValue); } + public double returnVal(double val){ + return val; + } }