Skip to content

Commit

Permalink
feat: Fixed logic for setting and toggeling solenoids
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingSR committed Feb 23, 2024
1 parent fba61e6 commit c093305
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/frc/robot/subsystems/ClimberSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

import frc.robot.Constants.ClimberConstants;

import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kForward;
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kOff;
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kReverse;

public class ClimberSubsystem {

Expand Down Expand Up @@ -43,25 +46,25 @@ public void off(){
* Extends both arms
*/
public void forward() {
m_leftSolenoid.set(kOff);
m_rightSolenoid.set(kOff);
m_leftSolenoid.set(kForward);
m_rightSolenoid.set(kForward);
}

//TODO:fix doc
/*
* Retracts the arm
*/
public void reverse() {
m_leftSolenoid.set(kOff);
m_rightSolenoid.set(kOff);
m_leftSolenoid.set(kReverse);
m_rightSolenoid.set(kReverse);
}
/*
* Toggles the state of the climber
*/

public void toggle() {
m_leftSolenoid.set(kOff);
m_rightSolenoid.set(kOff);
m_leftSolenoid.toggle();;
m_rightSolenoid.toggle();;
}

//Toggles the state of the compressor (on/off)
Expand Down

0 comments on commit c093305

Please sign in to comment.