Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////
- // File: Pneumatics.java
- /////////////////////////////////////////////////////////////////////
- //
- //Purpose: Defines the class responsible for all of the pneumatics
- // stuff on the robot for the 2019 FRC competition (Luna).
- //
- //Programmers: Elliott DuCharme for Caledonia Robotic Warriors team 5914
- //
- //Revision Date: 2/5/2019
- //
- //Remarks:
- //
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- package frc.robot;
- import edu.wpi.first.wpilibj.Compressor;
- import edu.wpi.first.wpilibj.DoubleSolenoid;
- import edu.wpi.first.wpilibj.Solenoid;
- public class Pneumatics {
- // public boolean compressor_enabled = false;
- // RobotDrive drive;
- // Robot robot;
- // Creates the compressor
- Compressor compressor;
- // Creates the solenoid
- // Solenoid solenoid;
- // Creates a double solenoid
- // DoubleSolenoid doubleSolenoid;
- // These may or may not be necessary...
- // boolean enabled = compressor.enabled();
- // boolean pressureSwitch = compressor.getPressureSwitchValue();
- // double current = compressor.getCompressorCurrent();
- // Same with these...
- // solenoid.set(true);
- // solenoid.set(false);
- public Pneumatics() {
- // drive = new RobotDrive();
- // robot = new Robot();
- compressor = new Compressor(0);
- // compressor_enabled = compressor.getPressureSwitchValue();
- // compressor.setClosedLoopControl(true);
- // if (compressor_enabled == true) {
- // compressor.start();
- // } else {
- // compressor.stop();
- // }
- // solenoid = new Solenoid();
- // doubleSolenoid = new DoubleSolenoid(0, 1);
- // if (drive.stick.getRawButton(robot.LEFT_ANALOG_STICK_BUTTON) == true) {
- // doubleSolenoid.set(DoubleSolenoid.Value.kForward);
- // } else {
- // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
- // }
- // if (drive.stick.getRawButton(robot.RIGHT_ANALOG_STICK_BUTTON) == true) {
- // doubleSolenoid.set(DoubleSolenoid.Value.kReverse);
- // } else {
- // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
- // }
- // if (drive.stick.getRawButton(robot.START_BUTTON) == true) {
- // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
- // }
- }
- // public void doubleExtend() {
- // doubleSolenoid.set(DoubleSolenoid.Value.kForward);
- // }
- // public void doubleContract() {
- // doubleSolenoid.set(DoubleSolenoid.Value.kReverse);
- // }
- // public void singleExtend() {
- // solenoid.set(true);
- // }
- // public void singleContract() {
- // solenoid.set(true);
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment