Skip to content

Commit

Permalink
added climber reset (#44)
Browse files Browse the repository at this point in the history
* added climber reset

* removed unused comment. fixed formatting
  • Loading branch information
ProgrammingSR authored Apr 5, 2024
1 parent c0396b0 commit b9c849e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public void resetAllSubsystems() {
m_intakeSubsystem.reset();
m_shooterSubsystem.reset();
m_robotDrive.reset();
m_climberSubsystem.reset();
}

public void compressorInit() {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/commands/DefaultLEDCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ public void initialize() {
}

//check for pneumatics state and override b4 value
if (m_climberSubsystem.getState() == Value.kForward){
if (m_climberSubsystem.getState() == Value.kForward) {
rgb[0] = 257;
rgb[1] = 257;
rgb[2] = 257;
}

if (m_intakeSubsystem.getArmPosition() == IntakeConstants.kIntakeAmpScoringAngle){
if (m_intakeSubsystem.ampReady()){
if (m_intakeSubsystem.getArmPosition() == IntakeConstants.kIntakeAmpScoringAngle) {
if (m_intakeSubsystem.ampReady()) {
rgb[0] = 0;
rgb[1] = 255;
rgb[2] = 0;
}
else{
else {
rgb[0] = 0;
rgb[1] = 255;
rgb[2] = 0;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/subsystems/ClimberSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public void periodic() {
SmartDashboard.putBoolean("Compressor Running", m_pHub.getCompressor());
}

public void reset() {
m_state = kOff;
}

/**
* Sets the state of the solenoid to off
*/
Expand Down

0 comments on commit b9c849e

Please sign in to comment.