Skip to content

Commit

Permalink
declared left and right climb motors, and made it so we only call the…
Browse files Browse the repository at this point in the history
…m "leftClimb" and "rightClimb" respectively
  • Loading branch information
atsuke-axolotl committed Feb 24, 2024
1 parent 3285205 commit 266deb6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ public class Constants {
public static final int DRIVE_RIGHT_PARENT_ID = 11;
public static final int DRIVE_RIGHT_CHILD_ID = 3;

/*CLIMB MOTOR IDS */

public static final int LEFT_CLIMB_ID = 31;
public static final int RIGHT_CLIMB_ID = 21;

/*SHOOTER CONFIG*/
public static final double REV_TIME = 1.0;

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public class Robot extends TimedRobot {
MotorController leftFlywheel = MotorControllerFactory.create(6, MotorController.Type.SparkMax);
MotorController rightFlywheel = MotorControllerFactory.create(7, MotorController.Type.SparkMax);
MotorController feederMotor = MotorControllerFactory.create(9, MotorController.Type.SparkMax);
MotorController leftClimb = MotorControllerFactory.create(Constants.LEFT_CLIMB_ID, MotorController.Type.Talon);
MotorController rightClimb = MotorControllerFactory.create(Constants.RIGHT_CLIMB_ID, MotorController.Type.Talon);
XboxController driverController = new XboxController(Constants.DRIVER_CONTROLLER_ID);
XboxController coDriverController = new XboxController(1);
static AHRS navX = new AHRS(SPI.Port.kMXP);
Expand Down Expand Up @@ -95,7 +97,9 @@ public void robotInit() {
.driveRightChild(driveRightChild)
.feeder(feederMotor)
.leftFlywheel(leftFlywheel)
.rightFlywheel(rightFlywheel);
.rightFlywheel(rightFlywheel)
.leftClimb(leftClimb)
.rightClimb(rightClimb);
getGyroscope().reset();
System.out.println(Constants.APRIL_TAG_CONFIDENCE_FRAMES);
SmartDashboard.putNumber("rotationGainsP", Constants.ROTATION_GAINS.P);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/RobotMotors.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public RobotMotors intakeMotor(MotorController intakeMotor) {
return this;
}

public RobotMotors leftClimbMotor(MotorController leftClimbMotor, String arg) {
this.leftClimb = leftClimbMotor;
public RobotMotors leftClimb(MotorController leftClimb) {
this.leftClimb = leftClimb;
return this;
}

public RobotMotors rightClimbMotor(MotorController rightClimbMotor) {
this.rightClimb = rightClimbMotor;
public RobotMotors rightClimb(MotorController rightClimb) {
this.rightClimb = rightClimb;
return this;
}
}

0 comments on commit 266deb6

Please sign in to comment.