From eb0ac8055ac5bf4249289e1e555563fd2ad77476 Mon Sep 17 00:00:00 2001 From: Team Laptop Date: Sun, 10 Mar 2024 12:07:49 -0700 Subject: [PATCH] Billie Jeans not my lover; Small Robot Container changes --- .../commands/{BreatheAir.java => FlapBreathe.java} | 10 ++++++---- .../frc/robot/subsystems/flapExtendoGuyPneumatics.java | 10 +++++----- ...{littleBillyRELOAD.java => littleBillieRELOAD.java} | 0 ...kerSmasher.java => littleBillieSpeakerSmasher.java} | 0 4 files changed, 11 insertions(+), 9 deletions(-) rename src/main/java/frc/robot/commands/{BreatheAir.java => FlapBreathe.java} (79%) rename src/main/java/frc/robot/subsystems/{littleBillyRELOAD.java => littleBillieRELOAD.java} (100%) rename src/main/java/frc/robot/subsystems/{littleBillySpeakerSmasher.java => littleBillieSpeakerSmasher.java} (100%) diff --git a/src/main/java/frc/robot/commands/BreatheAir.java b/src/main/java/frc/robot/commands/FlapBreathe.java similarity index 79% rename from src/main/java/frc/robot/commands/BreatheAir.java rename to src/main/java/frc/robot/commands/FlapBreathe.java index 9f0e331..b57de56 100644 --- a/src/main/java/frc/robot/commands/BreatheAir.java +++ b/src/main/java/frc/robot/commands/FlapBreathe.java @@ -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. } @@ -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) {} diff --git a/src/main/java/frc/robot/subsystems/flapExtendoGuyPneumatics.java b/src/main/java/frc/robot/subsystems/flapExtendoGuyPneumatics.java index 7e4148c..96e86e5 100644 --- a/src/main/java/frc/robot/subsystems/flapExtendoGuyPneumatics.java +++ b/src/main/java/frc/robot/subsystems/flapExtendoGuyPneumatics.java @@ -12,10 +12,8 @@ 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 @@ -23,7 +21,9 @@ 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(); } } diff --git a/src/main/java/frc/robot/subsystems/littleBillyRELOAD.java b/src/main/java/frc/robot/subsystems/littleBillieRELOAD.java similarity index 100% rename from src/main/java/frc/robot/subsystems/littleBillyRELOAD.java rename to src/main/java/frc/robot/subsystems/littleBillieRELOAD.java diff --git a/src/main/java/frc/robot/subsystems/littleBillySpeakerSmasher.java b/src/main/java/frc/robot/subsystems/littleBillieSpeakerSmasher.java similarity index 100% rename from src/main/java/frc/robot/subsystems/littleBillySpeakerSmasher.java rename to src/main/java/frc/robot/subsystems/littleBillieSpeakerSmasher.java