diff --git a/rio/robotcontainer.py b/rio/robotcontainer.py index a345302..a423f3e 100644 --- a/rio/robotcontainer.py +++ b/rio/robotcontainer.py @@ -116,6 +116,15 @@ def __init__(self) -> None: ) ) + self.shooter.setDefaultCommand( + commands2.cmd.run( + lambda: self.shooter.setFlyWheelSpeed( + self.opController.getRawAxis(2) + 0.16 + ), + self.shooter, + ) + ) + def configureButtonBindings(self) -> None: """ Use this method to define your button->command mappings. Buttons can be created by diff --git a/rio/subsystems/shooter.py b/rio/subsystems/shooter.py index a99594a..3ea8274 100644 --- a/rio/subsystems/shooter.py +++ b/rio/subsystems/shooter.py @@ -117,14 +117,6 @@ def isReady(self): def currentSpeed(self) -> float: return self.flyEncoder.getVelocity() - def setIdleBrake(self): - self.flyMotor.setIdleMode(CANSparkBase.IdleMode.kBrake) - self.flyMotor.burnFlash() - - def setIdleCoast(self): - self.flyMotor.setIdleMode(CANSparkBase.IdleMode.kCoast) - self.flyMotor.burnFlash() - def setFlyAngle(self, angle: float): self.flyPIDController.setReference(angle, CANSparkMax.ControlType.kPosition)