mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Change to reset everytime storage returns to the default command
This commit is contained in:
@@ -126,7 +126,7 @@ public class RobotContainer {
|
||||
m_robotLED.setDefaultCommand(new RunCommand(() -> m_robotLED.updateLED(), m_robotLED));
|
||||
// runs the storage not
|
||||
//m_robotStorage.setDefaultCommand(new RunCommand(() -> m_robotStorage.runStorage(0), m_robotStorage));
|
||||
m_robotStorage.setDefaultCommand(new RunCommand(() -> m_robotStorage.runStorage(0), m_robotStorage));
|
||||
m_robotStorage.setDefaultCommand(new ManageStorage(m_robotStorage, StorageMode.IDLE));
|
||||
//m_robotLime.setDefaultCommand(new RunCommand(() -> m_robotLime.limeOff(), m_robotLime));
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public class RobotContainer {
|
||||
//Run drum
|
||||
new JoystickButton(getOperatorJoystick(), XboxController.B_BUTTON)
|
||||
.whileHeld(new ShootPrepGroup(m_robotShooter, m_robotShooterAim, m_robotShooterHood, m_robotStorage), false)
|
||||
.whenReleased(new ManageStorage(m_robotStorage, StorageMode.RESET))
|
||||
//.whenReleased(new ManageStorage(m_robotStorage, StorageMode.RESET))
|
||||
.whenReleased(new InstantCommand(() -> m_robotLime.limeOff()));
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ public class ManageStorage extends CommandBase {
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
m_storageMode = StorageMode.RESET;
|
||||
}
|
||||
|
||||
// Returns true when the command should end.
|
||||
|
||||
Reference in New Issue
Block a user