Permalink
Browse files

Changed the drive subsystem to match the new motor controllers.

  • Loading branch information...
elizarg committed Nov 29, 2018
1 parent 4cfa47d commit 35215b29dd2ee30c1f626d8e6aab81c0e9ab5f6f
Showing with 12 additions and 8 deletions.
  1. +12 −8 src/main/java/org/usfirst/frc/team1700/robot/subsystems/DriveSubsystem.java
@@ -9,16 +9,20 @@
public class DriveSubsystem{

// MOTORS AND SENSORS : UPDATE BASED ON WHAT'S ON THE PRACTICE DRIVETRAIN
VictorSPX LF = RobotMap.leftFrontDrive;
VictorSPX RF = RobotMap.rightFrontDrive;
TalonSRX LB = RobotMap.leftBackDrive;
TalonSRX RB = RobotMap.rightBackDrive;
TalonSRX L1 = RobotMap.leftFirstDrive;
TalonSRX L2 = RobotMap.leftSecondDrive;
TalonSRX L3 = RobotMap.leftThirdDrive;
TalonSRX R1 = RobotMap.rightFirstDrive;
TalonSRX R2 = RobotMap.rightSecondDrive;
TalonSRX R3 = RobotMap.rightThirdDrive;

//Intakes the speeds of joysticks and updates motor speeds
public void driveTank(double leftPercentOutput, double rightPercentOutput) {
LF.set(ControlMode.PercentOutput, -leftPercentOutput);
LB.set(ControlMode.PercentOutput, -leftPercentOutput);
RF.set(ControlMode.PercentOutput, rightPercentOutput);
RB.set(ControlMode.PercentOutput, rightPercentOutput);
L1.set(ControlMode.PercentOutput, -leftPercentOutput);
L2.set(ControlMode.PercentOutput, -leftPercentOutput);
L3.set(ControlMode.PercentOutput, -leftPercentOutput);
R1.set(ControlMode.PercentOutput, rightPercentOutput);
R2.set(ControlMode.PercentOutput, rightPercentOutput);
R3.set(ControlMode.PercentOutput, rightPercentOutput);
}
}

0 comments on commit 35215b2

Please sign in to comment.