Skip to content

Commit

Permalink
inverted arcade drive and increased speed,
Browse files Browse the repository at this point in the history
also added enum for sparrow drive
  • Loading branch information
Team6423 committed Dec 23, 2021
1 parent 677421c commit 592e2dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public final class Constants {
public static final int LEFT_SECONDARY = 1;
public static final int RIGHT_PRIMARY = 5;
public static final int RIGHT_SECONDARY = 2;
//public static final double LEFT_CALIBRATION = 0.99;

/**
* CannonUtil Constants
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class RobotContainer {

public static Joystick leftStick, rightStick;
public static XboxController operator;


/** The container for the robot. Contains subsystems, OI devices, and commands. */
public RobotContainer() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/handlers/DriveMode.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package frc.robot.handlers;

public enum DriveMode {
ARCADE, TANK
ARCADE, TANK, SPARROW
}
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/DriveUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public void toggleDriveMode() {
public void driveRobot(double leftX, double leftY, double rightX, double rightY) {
if (driveMode.equals(DriveMode.ARCADE)) {
// If we're in ARCADE mode, use arcadeDrive
differentialDrive.arcadeDrive(rightY, rightX);
differentialDrive.arcadeDrive(rightY, -rightX); //Invert angle
} else if (driveMode.equals(DriveMode.TANK)) {
// If we're in TANK mode, use tankDrive
differentialDrive.tankDrive(leftY/2, rightY/2);
differentialDrive.tankDrive(leftY, rightY);
}
}

Expand Down

0 comments on commit 592e2dc

Please sign in to comment.