Guest User

Untitled

a guest
Feb 15th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. /////////////////////////////////////////////////////////////////////
  2. // File: Pneumatics.java
  3. /////////////////////////////////////////////////////////////////////
  4. //
  5. //Purpose: Defines the class responsible for all of the pneumatics
  6. // stuff on the robot for the 2019 FRC competition (Luna).
  7. //
  8. //Programmers: Elliott DuCharme for Caledonia Robotic Warriors team 5914
  9. //
  10. //Revision Date: 2/5/2019
  11. //
  12. //Remarks:
  13. //
  14. /////////////////////////////////////////////////////////////////////
  15. /////////////////////////////////////////////////////////////////////
  16.  
  17. package frc.robot;
  18.  
  19. import edu.wpi.first.wpilibj.Compressor;
  20. import edu.wpi.first.wpilibj.DoubleSolenoid;
  21. import edu.wpi.first.wpilibj.Solenoid;
  22.  
  23. public class Pneumatics {
  24.  
  25. // public boolean compressor_enabled = false;
  26.  
  27. // RobotDrive drive;
  28. // Robot robot;
  29.  
  30. // Creates the compressor
  31. Compressor compressor;
  32.  
  33. // Creates the solenoid
  34. // Solenoid solenoid;
  35.  
  36. // Creates a double solenoid
  37. // DoubleSolenoid doubleSolenoid;
  38.  
  39. // These may or may not be necessary...
  40. // boolean enabled = compressor.enabled();
  41. // boolean pressureSwitch = compressor.getPressureSwitchValue();
  42. // double current = compressor.getCompressorCurrent();
  43.  
  44. // Same with these...
  45. // solenoid.set(true);
  46. // solenoid.set(false);
  47.  
  48. public Pneumatics() {
  49.  
  50. // drive = new RobotDrive();
  51. // robot = new Robot();
  52.  
  53. compressor = new Compressor(0);
  54.  
  55. // compressor_enabled = compressor.getPressureSwitchValue();
  56.  
  57. // compressor.setClosedLoopControl(true);
  58.  
  59. // if (compressor_enabled == true) {
  60. // compressor.start();
  61. // } else {
  62. // compressor.stop();
  63. // }
  64.  
  65. // solenoid = new Solenoid();
  66.  
  67. // doubleSolenoid = new DoubleSolenoid(0, 1);
  68.  
  69. // if (drive.stick.getRawButton(robot.LEFT_ANALOG_STICK_BUTTON) == true) {
  70. // doubleSolenoid.set(DoubleSolenoid.Value.kForward);
  71. // } else {
  72. // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
  73. // }
  74.  
  75. // if (drive.stick.getRawButton(robot.RIGHT_ANALOG_STICK_BUTTON) == true) {
  76. // doubleSolenoid.set(DoubleSolenoid.Value.kReverse);
  77. // } else {
  78. // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
  79. // }
  80.  
  81. // if (drive.stick.getRawButton(robot.START_BUTTON) == true) {
  82. // doubleSolenoid.set(DoubleSolenoid.Value.kOff);
  83. // }
  84.  
  85. }
  86.  
  87. // public void doubleExtend() {
  88.  
  89. // doubleSolenoid.set(DoubleSolenoid.Value.kForward);
  90.  
  91. // }
  92.  
  93. // public void doubleContract() {
  94.  
  95. // doubleSolenoid.set(DoubleSolenoid.Value.kReverse);
  96.  
  97. // }
  98.  
  99. // public void singleExtend() {
  100. // solenoid.set(true);
  101. // }
  102.  
  103. // public void singleContract() {
  104. // solenoid.set(true);
  105. // }
  106.  
  107. }
Advertisement
Add Comment
Please, Sign In to add comment