import org.usfirst.frc.team3501.robot.subsystems.Scaler;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
public static IntakeArm intakeArm;
public static DefenseArm defenseArm;
+ public static Compressor compressor;
+
// 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() {
// addPositionChooserOptions();
// addDefensesToAllDefenseSendableChoosers();
// sendSendableChoosersToSmartDashboard();
+ compressor = new Compressor();
}
@Override
public void teleopInit() {
- Scheduler.getInstance().add(new JoystickDrive());
+ Scheduler.getInstance().add(new JoystickDrive());
+ compressor.start();
+ driveTrain.leftGearPiston.set(Constants.DriveTrain.HIGH_GEAR);
+ driveTrain.rightGearPiston.set(Constants.DriveTrain.HIGH_GEAR);
}
@Override
private RobotDrive robotDrive;
private GyroLib gyro;
- private DoubleSolenoid leftGearPiston, rightGearPiston;
+ public DoubleSolenoid leftGearPiston, rightGearPiston;
// Drivetrain specific constants that relate to the inches per pulse value for
// the encoders
/*
* Method is a required method that the PID Subsystem uses to return the
* calculated PID value to the driver
- *
+ *
* @param Gives the user the output from the PID algorithm that is calculated
* internally
- *
+ *
* Body: Uses the output, does some filtering and drives the robot
*/
@Override
/*
* Checks the drive mode
- *
+ *
* @return the current state of the robot in each state Average distance from
* both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE
*/
/*
* constrains the distance to within -100 and 100 since we aren't going to
* drive more than 100 inches
- *
+ *
* Configure Encoder PID
- *
+ *
* Sets the setpoint to the PID subsystem
*/
public void driveDistance(double dist, double maxTimeOut) {
/*
* Turning method that should be used repeatedly in a command
- *
+ *
* First constrains the angle to within -360 and 360 since that is as much as
* we need to turn
- *
+ *
* Configures Gyro PID and sets the setpoint as an angle
*/
public void turnAngle(double angle) {