From: moo <160301629+moogoesmeow0@users.noreply.github.com> Date: Fri, 21 Aug 2026 01:55:04 +0000 (-0700) Subject: controls changes and jostling X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=b8f953166e2bf29d47fcc04c564552ef8674502a;p=FRC2026.git controls changes and jostling --- diff --git a/src/main/java/frc/robot/commands/gpm/IntakeMovementCommand.java b/src/main/java/frc/robot/commands/gpm/IntakeMovementCommand.java index a623e61..aaeb45a 100644 --- a/src/main/java/frc/robot/commands/gpm/IntakeMovementCommand.java +++ b/src/main/java/frc/robot/commands/gpm/IntakeMovementCommand.java @@ -6,7 +6,7 @@ import frc.robot.subsystems.Intake.Intake; public class IntakeMovementCommand extends Command { private final Intake intake; - private final double interval = 0.6; // Change this to make it faster/slower (seconds) + private final double interval = 0.7; // Change this to make it faster/slower (seconds) public IntakeMovementCommand(Intake intake) { this.intake = intake; diff --git a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index 6a7caa8..9ae380e 100644 --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@ -7,6 +7,7 @@ import edu.wpi.first.wpilibj.DriverStation.Alliance; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; import edu.wpi.first.wpilibj2.command.InstantCommand; +import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import frc.robot.Robot; import frc.robot.commands.gpm.IntakeMovementCommand; import frc.robot.commands.gpm.ReverseMotors; @@ -94,7 +95,7 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { // Make the intake go in and out while shooting controller.get(DPad.UP).whileTrue(new IntakeMovementCommand(intake) - .alongWith(new InstantCommand(()-> intakeBoolean = true))); + .alongWith(new InstantCommand(() -> intakeBoolean = true))); // Calibration: you can now calibrate easily using this button if (hood != null && intake != null) { @@ -108,11 +109,11 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { } // Stop intake roller - controller.get(DPad.DOWN).onTrue(new InstantCommand(()->{ - if(intakeBoolean){ + controller.get(DPad.DOWN).onTrue(new InstantCommand(() -> { + if (intakeBoolean) { intake.spinStart(); intakeBoolean = false; - } else{ + } else { intake.spinStop(); intakeBoolean = true; } @@ -123,9 +124,10 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { if (spindexer != null && turret != null && hood != null && intake != null) { // Toggle spindexer - controller.get(PS5Button.LEFT_TRIGGER).toggleOnTrue( - new RunSpindexer(spindexer, turret, hood, intake) - ); + controller.get(PS5Button.LEFT_TRIGGER).onTrue( + new ParallelCommandGroup(new InstantCommand(() -> hood.forceHoodDown(false), hood), + new RunSpindexer(spindexer, turret, hood, intake))) + .onFalse(new InstantCommand(() -> hood.forceHoodDown(true), hood)); } // Auto shoot @@ -134,15 +136,14 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { controller.get(PS5Button.SQUARE).toggleOnTrue(autoShoot); } - // Hood if (hood != null) { // Set the hood down -- for safety measures under trench - controller.get(DPad.LEFT).onTrue(new InstantCommand(()->{ - hood.forceHoodDown(true); - }, hood)).onFalse(new InstantCommand(()->{ - hood.forceHoodDown(false); - })); + // controller.get(DPad.LEFT).onTrue(new InstantCommand(()->{ + // hood.forceHoodDown(true); + // }, hood)).onFalse(new InstantCommand(()->{ + // hood.forceHoodDown(false); + // })); } } diff --git a/src/main/java/frc/robot/subsystems/Intake/Intake.java b/src/main/java/frc/robot/subsystems/Intake/Intake.java index 59f105b..6fcc8ca 100644 --- a/src/main/java/frc/robot/subsystems/Intake/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake/Intake.java @@ -73,7 +73,7 @@ public class Intake extends SubsystemBase implements IntakeIO{ // max free speed (rot/s) = motor free speed (rad/s to rot/s)/ gear ratio // safety margin, limits velocity to .75 free speed - maxVelocity = 0.75 * maxFreeSpeed; + maxVelocity = 1.0 * maxFreeSpeed; //safety is for people with no pit team maxAcceleration = maxVelocity / 0.25; // ----Rollers diff --git a/src/main/java/frc/robot/subsystems/hood/Hood.java b/src/main/java/frc/robot/subsystems/hood/Hood.java index 4bf9d34..5823a68 100644 --- a/src/main/java/frc/robot/subsystems/hood/Hood.java +++ b/src/main/java/frc/robot/subsystems/hood/Hood.java @@ -36,7 +36,7 @@ public class Hood extends SubsystemBase implements HoodIO { private boolean calibrating = false; private Debouncer calibrateDebouncer = new Debouncer(0.5, DebounceType.kRising); - private boolean forceHoodDown = false; + private boolean forceHoodDown = true; private HoodIOInputsAutoLogged inputs = new HoodIOInputsAutoLogged();