// Sendable Choosers send a drop down menu to the Smart Dashboard.
SendableChooser positionChooser;
SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
- positionFourDefense, positionFiveDefense;
+ positionFourDefense, positionFiveDefense;
@Override
public void robotInit() {
driveTrain = new DriveTrain();
oi = new OI();
+ shooter = new Shooter();
+
// shooter = new Shooter();
// scaler = new Scaler();
// intakeArm = new IntakeArm();
SmartDashboard.putData("Position Two Defense Chooser", positionTwoDefense);
SmartDashboard.putData("Position Three Defense Chooser",
positionThreeDefense);
- SmartDashboard.putData("Position Four Defense Chooser",
- positionFourDefense);
- SmartDashboard.putData("Position Five Defense Chooser",
- positionFiveDefense);
+ SmartDashboard
+ .putData("Position Four Defense Chooser", positionFourDefense);
+ SmartDashboard
+ .putData("Position Five Defense Chooser", positionFiveDefense);
- SmartDashboard.putData("Position Four Defense Chooser",
- positionFourDefense);
- SmartDashboard.putData("Position Five Defense Chooser",
- positionFiveDefense);
-
- shooter = new Shooter();
+ SmartDashboard
+ .putData("Position Four Defense Chooser", positionFourDefense);
+ SmartDashboard
+ .putData("Position Five Defense Chooser", positionFiveDefense);
}
@Override
public void teleopInit() {
Robot.driveTrain.setLowGear();
+ Robot.shooter.raiseHood();
}
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
+ if (OI.rightJoystick.getTrigger()) {
+ Robot.shooter.setSpeed(.8);
+ } else {
+ Robot.shooter.setSpeed(0);
+ }
+ if (OI.rightJoystick.getRawButton(2)) {
+ Robot.shooter.extendPunch();
+ } else {
+ Robot.shooter.retractPunch();
+
+ }
}
}