Skip to content

Commit

Permalink
Billie Jeans not my lover; Small Robot Container changes
Browse files Browse the repository at this point in the history
  • Loading branch information
FRC7447 committed Mar 10, 2024
1 parent 34bdd4a commit eb0ac80
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

package frc.robot.commands;

import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.subsystems.flapExtendoGuyPneumatics;

public class BreatheAir extends Command {
public class FlapBreathe extends Command {
/** Creates a new BreatheAir. */
private final flapExtendoGuyPneumatics m_flapExtendoGuyPneumatics;
private final Timer m_Timer;

public BreatheAir(flapExtendoGuyPneumatics ExtendoGuy) {
public FlapBreathe(flapExtendoGuyPneumatics ExtendoGuy, Timer wait) {
m_flapExtendoGuyPneumatics = ExtendoGuy;
m_Timer = wait;
// Use addRequirements() here to declare subsystem dependencies.
}

Expand All @@ -23,9 +26,8 @@ public void initialize() {}
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
m_flapExtendoGuyPneumatics.extendoGuy_set(true);
m_flapExtendoGuyPneumatics.extendoGuy_set();
}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/subsystems/flapExtendoGuyPneumatics.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
public class flapExtendoGuyPneumatics extends SubsystemBase {
/** Creates a new flapExtendoGuyPneumatics. */
Solenoid extendoGuy;
public flapExtendoGuyPneumatics() {

public flapExtendoGuyPneumatics() {
extendoGuy = new Solenoid(PneumaticsModuleType.CTREPCM, Constants.PneumaticsConstants.extendoGuy_channel);

}

@Override
public void periodic() {
// This method will be called once per scheduler run
}

public void extendoGuy_set(boolean onoff) {
extendoGuy.set(onoff);
public void extendoGuy_set() {
extendoGuy.set(true);
extendoGuy.setPulseDuration(Constants.PneumaticsConstants.extendoGuyWaitTime);
extendoGuy.startPulse();
}
}

0 comments on commit eb0ac80

Please sign in to comment.