Skip to content

Commit bf19eb7

Browse files
Baconingghsfrc5183
authored andcommitted
feat(shooter): add shooting by distance
1 parent 1e3d167 commit bf19eb7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/kotlin/org/frc5183/robot/subsystems/shooter/ShooterSubsystem.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ class ShooterSubsystem(
3838
runFeeder(-1.0)
3939
}
4040

41+
fun shoot(velocity: AngularVelocity) {
42+
runShooterVelocity(velocity)
43+
runIntake(-1.0)
44+
runFeeder(-1.0)
45+
}
46+
4147
fun runShooter(speed: Double) = shooter.set(-speed)
4248
fun runShooterVelocity(velocity: AngularVelocity) = shooter.closedLoopController.setSetpoint(velocity.`in`(Units.RPM), SparkBase.ControlType.kVelocity)
4349
fun runIntake(speed: Double) = intake.set(-speed)

0 commit comments

Comments
 (0)