mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
incorporating indexer waiting for shooter speed
This commit is contained in:
@@ -152,7 +152,11 @@ public class Shooter extends SubsystemBase {
|
|||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Shooting:
|
case Shooting:
|
||||||
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get()));
|
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get()));
|
||||||
io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_FORWARD_VELOCITY.get()));
|
if(state.motor1Velocity.in(RotationsPerSecond) > 30){
|
||||||
|
io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_FORWARD_VELOCITY.get()));
|
||||||
|
}else{
|
||||||
|
io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_REVERSE_VELOCITY.get()));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Ready:
|
case Ready:
|
||||||
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get()));
|
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get()));
|
||||||
|
|||||||
Reference in New Issue
Block a user