Skip to content

Commit

Permalink
Finished until testing!
Browse files Browse the repository at this point in the history
  • Loading branch information
joshs48 committed Dec 11, 2019
1 parent ecfac8c commit 97774ed
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,24 @@ public void autonomousPeriodic() {
public void teleopPeriodic() {
leftAngle.set(ControlMode.PercentOutput, opStick.getY() /2);//sets angle to the joystick value divided by 2
rightAngle.set(ControlMode.PercentOutput, opStick.getX() /2);
if (c.getPressureSwitchValue()) {
c.start();
if (compressor.getPressureSwitchValue()) {
compressor.start();
} else {
c.stop();
compressor.stop();
}

if (launchButton.get()) {

leftLaunchWheel.set(ControlMode.PercentOutput, 0.5);//motors on
rightLaunchWheel.set(ControlMode.PercentOutput, 0.5);
s.set(true);// Fires solenoid
s.set(false);
solenoid.set(true);// Fires solenoid
try {
solenoid.wait(500);
}
catch (Exception e) {
solenoid.set(false);
}
solenoid.set(false);
leftLaunchWheel.set(ControlMode.PercentOutput, 0); // motors off
rightLaunchWheel.set(ControlMode.PercentOutput, 0);
} else {
Expand Down

0 comments on commit 97774ed

Please sign in to comment.