Skip to content

Commit

Permalink
fix: seperated buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingSR committed Feb 21, 2024
1 parent b7889ea commit 0230de8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ private void configureBindings() {
.onTrue(new InstantCommand(() -> m_shooterSubsystem.spin(-0.75), m_shooterSubsystem))
.onFalse(new InstantCommand(() -> m_shooterSubsystem.spin(0), m_shooterSubsystem));
new JoystickButton(m_operatorController, Button.kA.value)
.onTrue(new InstantCommand(() -> m_climberSubsystem.toggle(), m_shooterSubsystem));
.onTrue(new InstantCommand(() -> m_climberSubsystem.forward(), m_shooterSubsystem));
new JoystickButton(m_operatorController, Button.kB.value)
.onTrue(new InstantCommand(() -> m_climberSubsystem.reverse(), m_shooterSubsystem));
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/climberSubSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kOff;

public class ClimberSubsystem {
// All

private final DoubleSolenoid m_leftSolenoid = new DoubleSolenoid(PneumaticsModuleType.REVPH, ClimberConstants.leftForwardChannel, ClimberConstants.leftReverseChannel);
private final DoubleSolenoid m_rightSolenoid = new DoubleSolenoid(PneumaticsModuleType.REVPH, ClimberConstants.rightForwardChannel, ClimberConstants.rightReverseChannel);

private final Compressor m_compressor = new Compressor(PneumaticsModuleType.REVPH);

private boolean enableCompressor = true;

//
public ClimberSubsystem(){
m_leftSolenoid.set(kOff);
m_rightSolenoid.set(kOff);
Expand Down

0 comments on commit 0230de8

Please sign in to comment.