-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement OOP based codriver controls
- Loading branch information
Showing
4 changed files
with
71 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
package frc.robot.RobotComponents; | ||
|
||
public class Climber {} | ||
import frc.robot.Constants; | ||
import frc.robot.Robot; | ||
import frc.robot.auton.ExtendArms; | ||
import frc.robot.auton.RetractArms; | ||
|
||
public class Climber { | ||
|
||
private static void extendArms() { | ||
Robot.getTeleopActionRunner().addActionToRun(new ExtendArms()); | ||
Robot.getTeleopActionRunner().removeActionsOfType(RetractArms.class); | ||
} | ||
|
||
private static void retractArms() { | ||
Robot.getTeleopActionRunner().addActionToRun(new RetractArms()); | ||
Robot.getTeleopActionRunner().removeActionsOfType(ExtendArms.class); | ||
} | ||
|
||
public static void manualExtendArms() { | ||
Robot.motors.getLeftClimb().set(Constants.CLIMB_EXTENSION_SPEED); | ||
Robot.motors.getRightClimb().set(Constants.CLIMB_EXTENSION_SPEED); | ||
} | ||
|
||
public static void manualRetractArms() { | ||
Robot.motors.getLeftClimb().set(Constants.CLIMB_RETRACTION_SPEED); | ||
Robot.motors.getRightClimb().set(Constants.CLIMB_RETRACTION_SPEED); | ||
} | ||
|
||
public static void stopClimbMotors() { | ||
Robot.motors.getLeftClimb().stopMotor(); | ||
Robot.motors.getRightClimb().stopMotor(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
package frc.robot.RobotComponents; | ||
|
||
public class Intake {} | ||
import frc.robot.Robot; | ||
|
||
public class Intake { | ||
|
||
public static void startFloorIntake() { | ||
Robot.motors.getIntake().set(.5); | ||
} | ||
|
||
public static void stopFloorIntake() { | ||
Robot.motors.getIntake().stopMotor(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters