Skip to content

Commit

Permalink
Revert "keep it rainbow while climbing"
Browse files Browse the repository at this point in the history
This reverts commit 36359cd.
  • Loading branch information
ProgrammingSR committed Mar 30, 2024
1 parent 36359cd commit 970175a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/DefaultLEDCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void initialize() {
}

//check for pneumatics state and override b4 value
if (m_climberSubsystem.getState() == Value.kForward || m_climberSubsystem.deployed()){
if (m_climberSubsystem.getState() == Value.kForward){
rgb[0] = 257;
rgb[1] = 257;
rgb[2] = 257;
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/frc/robot/subsystems/ClimberSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
import edu.wpi.first.wpilibj.PneumaticHub;
import edu.wpi.first.wpilibj.PneumaticsModuleType;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants.ClimberConstants;
Expand All @@ -24,9 +23,6 @@ public class ClimberSubsystem extends SubsystemBase {

private Value m_state;

private double togglecount = 0;
private Timer m_timer = new Timer();

public ClimberSubsystem() {
m_pHub = new PneumaticHub(2);

Expand All @@ -43,10 +39,6 @@ public void periodic() {
SmartDashboard.putNumber("pressure", m_pHub.getPressure(0));
SmartDashboard.putBoolean("Compressor Enabled", m_compressorEnabled);
SmartDashboard.putBoolean("Compressor Running", m_pHub.getCompressor());

if (togglecount >= 3){
togglecount = 0;
}
}

/**
Expand All @@ -61,25 +53,19 @@ public void solenoidOff() {
*/
public void forward() {
m_state = kForward;
togglecount++;
}

/**
* Retracts both arms
*/
public void reverse() {
m_state = kReverse;
togglecount++;
}

public Value getState(){
return m_state;
}

public boolean deployed(){
return togglecount > 0;
}

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

0 comments on commit 970175a

Please sign in to comment.