mirror of
https://github.com/Team4388/2025RidgeScape.git
synced 2026-06-09 00:38:02 -06:00
Merge branch 'master' into Debug-Autos
This commit is contained in:
@@ -47,9 +47,10 @@ import com.pathplanner.lib.commands.PathPlannerAuto;
|
||||
// Subsystems
|
||||
// import frc4388.robot.subsystems.LED;
|
||||
import frc4388.robot.subsystems.Vision;
|
||||
import frc4388.robot.subsystems.Elevator.CoordinationState;
|
||||
import frc4388.robot.subsystems.Lidar;
|
||||
import frc4388.robot.subsystems.Elevator;
|
||||
import frc4388.robot.subsystems.Endeffector;
|
||||
// import frc4388.robot.subsystems.Endeffector;
|
||||
import frc4388.robot.subsystems.SwerveDrive;
|
||||
|
||||
// Utilites
|
||||
@@ -74,8 +75,7 @@ public class RobotContainer {
|
||||
// private final LED m_robotLED = new LED();
|
||||
public final Vision m_vision = new Vision(m_robotMap.camera);
|
||||
public final Lidar m_lidar = new Lidar();
|
||||
public final Elevator m_robotELevator= new Elevator(m_robotMap.elevator);
|
||||
public final Endeffector m_robotEndeffector = new Endeffector(m_robotMap.endeffector);
|
||||
public final Elevator m_robotElevator= new Elevator(m_robotMap.elevator, m_robotMap.endeffector, m_robotMap.basinLimitSwitch, m_robotMap.endefectorLimitSwitch);
|
||||
public final SwerveDrive m_robotSwerveDrive = new SwerveDrive(m_robotMap.swerveDrivetrain, m_vision);
|
||||
// public final SwerveDrive m_robotSwerveDrive = new SwerveDrive(m_robotMap.swerveDrivetrain);
|
||||
|
||||
@@ -220,8 +220,21 @@ public class RobotContainer {
|
||||
.onTrue(AutoGotoPosition);
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.B_BUTTON)
|
||||
.onTrue(new InstantCommand(()->{}, m_robotSwerveDrive));
|
||||
// creates an empty command & requires the swerve drive, subsystems can run only 1 command at a time
|
||||
.onTrue(new InstantCommand(() -> {}, m_robotSwerveDrive));
|
||||
|
||||
|
||||
DualJoystickButton(getDeadbandedOperatorController(), getVirtualOperatorController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.Waiting), m_robotElevator));
|
||||
|
||||
DualJoystickButton(getDeadbandedOperatorController(), getVirtualOperatorController(), XboxController.B_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.Ready), m_robotElevator));
|
||||
|
||||
DualJoystickButton(getDeadbandedOperatorController(), getVirtualOperatorController(), XboxController.Y_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.ScoringThree), m_robotElevator));
|
||||
|
||||
DualJoystickButton(getDeadbandedOperatorController(), getVirtualOperatorController(), XboxController.X_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotElevator.transitionState(CoordinationState.ScoringFour), m_robotElevator));
|
||||
|
||||
|
||||
// ? /* Programer Buttons (Controller 3)*/
|
||||
|
||||
@@ -239,37 +252,6 @@ public class RobotContainer {
|
||||
true, false))
|
||||
.onFalse(new InstantCommand());
|
||||
|
||||
/*DPad for Level 1 and 2*/
|
||||
new Trigger(() -> getDeadbandedOperatorController().getRawAxis(XboxController.RIGHT_TRIGGER_AXIS) > 0.9)
|
||||
.onTrue(new InstantCommand(() -> m_robotELevator.PIDLevel2()))
|
||||
.onFalse(new InstantCommand(() -> m_robotELevator.elevatorStop()));
|
||||
|
||||
new Trigger(() -> getDeadbandedOperatorController().getRawAxis(XboxController.LEFT_TRIGGER_AXIS) > 0.9)
|
||||
.onTrue(new InstantCommand(() -> m_robotELevator.PIDLevel1()))
|
||||
.onFalse(new InstantCommand(() -> m_robotELevator.elevatorStop()));
|
||||
|
||||
/*Free Brid Mode With Bummpers*/
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotELevator.elevatorDown()))
|
||||
.onFalse(new InstantCommand(() -> m_robotELevator.elevatorStop()));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotELevator.elevatorUp()))
|
||||
.onFalse(new InstantCommand(() -> m_robotELevator.elevatorStop()));
|
||||
|
||||
/*Endeffector Controls*/
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotEndeffector.PIDTop()))
|
||||
.onFalse(new InstantCommand(() -> m_robotEndeffector.endEffectorStop()));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.B_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotEndeffector.PIDMiddle()))
|
||||
.onFalse(new InstantCommand(() -> m_robotEndeffector.endEffectorStop()));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotEndeffector.PIDBottom()))
|
||||
.onFalse(new InstantCommand(() -> m_robotEndeffector.endEffectorStop()));;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user