Tweaked shooter offset model and new progress with X position
This commit is contained in:
mimigamin
2026-03-14 18:29:15 -06:00
parent 07ec609b01
commit ebab028818
11 changed files with 87 additions and 35 deletions
@@ -87,6 +87,9 @@ public class ShooterReal implements ShooterIO {
public void setIndexerOutput(ShooterState state, double percentOutput) {
state.indexerTargetOutput = percentOutput;
m_indexerMotor.set(percentOutput);
if (state.indexerTargetOutput - state.indexerOutput > 0.05){
state.indexerForwardVelocity = m_indexerMotor.getVelocity().getValue().div(ShooterConstants.INDEXER_GEAR_RATIO);
}
}
@@ -95,7 +98,6 @@ public class ShooterReal implements ShooterIO {
state.motor1Velocity = m_shooter1Motor.getVelocity().getValue().div(ShooterConstants.SHOOTERMOTOR_GEAR_RATIO);
state.motor2Velocity = m_shooter2Motor.getVelocity().getValue().div(ShooterConstants.SHOOTERMOTOR_GEAR_RATIO);
state.indexerVelocity = m_indexerMotor.getVelocity().getValue().div(ShooterConstants.INDEXER_GEAR_RATIO);
state.indexerOutput = m_indexerMotor.get();
// state.indexerOutput = m_indexerMotor.getVelocity().getValue().div(ShooterConstants.INDEXER_GEAR_RATIO);