4 Commits

Author SHA1 Message Date
e7dfa11196 New Spindexer Positions after repair. 2026-01-20 20:38:40 -06:00
51bf55cc49 Merge remote-tracking branch 'origin/SpindexerRefactor' into SpindexerRefactor 2026-01-19 23:40:52 -06:00
ccb52f625d error check 2026-01-19 20:42:22 -06:00
8f92dc8f31 test 2026-01-19 20:28:13 -06:00
3 changed files with 9 additions and 9 deletions

View File

@@ -5,11 +5,11 @@ import com.acmerobotics.dashboard.config.Config;
@Config @Config
public class ServoPositions { public class ServoPositions {
public static double spindexer_intakePos1 = 0.39; public static double spindexer_intakePos1 = 0.19;
public static double spindexer_intakePos2 = 0.55;//0.5; public static double spindexer_intakePos2 = 0.35;//0.5;
public static double spindexer_intakePos3 = 0.71;//0.66; public static double spindexer_intakePos3 = 0.51;//0.66;
public static double spindexer_outtakeBall3 = 0.47; public static double spindexer_outtakeBall3 = 0.47;

View File

@@ -74,7 +74,7 @@ public class Flywheel {
// Record Current Velocity // Record Current Velocity
velo1 = TPS_to_RPM(robot.shooter1.getVelocity()); velo1 = TPS_to_RPM(robot.shooter1.getVelocity());
velo2 = TPS_to_RPM(robot.shooter1.getVelocity()); velo2 = TPS_to_RPM(robot.shooter1.getVelocity()); // Possible error: should it be shooter2 not shooter1?
velo = Math.max(velo1,velo2); velo = Math.max(velo1,velo2);
// really should be a running average of the last 5 // really should be a running average of the last 5

View File

@@ -336,21 +336,21 @@ public class Spindexer {
commandedIntakePosition = 0; commandedIntakePosition = 0;
servos.setSpinPos(outakePositions[commandedIntakePosition]); servos.setSpinPos(outakePositions[commandedIntakePosition]);
currentIntakeState = Spindexer.IntakeState.SHOOTMOVING; currentIntakeState = Spindexer.IntakeState.SHOOTMOVING;
} else if (ballPositions[1].isEmpty) { } else if (ballPositions[1].isEmpty) { // Possible error: should it be !ballPosition[1].isEmpty?
// Position 2 // Position 2
commandedIntakePosition = 1; commandedIntakePosition = 1;
servos.setSpinPos(outakePositions[commandedIntakePosition]); servos.setSpinPos(outakePositions[commandedIntakePosition]);
currentIntakeState = Spindexer.IntakeState.SHOOTMOVING; currentIntakeState = Spindexer.IntakeState.SHOOTMOVING;
} else if (ballPositions[2].isEmpty) { } else if (ballPositions[2].isEmpty) { // Possible error: should it be !ballPosition[2].isEmpty?
// Position 3 // Position 3
commandedIntakePosition = 2; commandedIntakePosition = 2;
servos.setSpinPos(intakePositions[commandedIntakePosition]); servos.setSpinPos(intakePositions[commandedIntakePosition]); // Possible error: should it be using "outakePositions" instead of "intakePositions"
currentIntakeState = Spindexer.IntakeState.SHOOTMOVING; currentIntakeState = Spindexer.IntakeState.SHOOTMOVING;
} else { } else {
// Empty return to intake state // Empty return to intake state
currentIntakeState = IntakeState.FINDNEXT; currentIntakeState = IntakeState.FINDNEXT;
} }
moveSpindexerToPos(intakePositions[commandedIntakePosition]); moveSpindexerToPos(intakePositions[commandedIntakePosition]); // Possible error: should it be using "outakePositions" instead of "intakePositions"
break; break;
case SHOOTMOVING: case SHOOTMOVING:
@@ -369,7 +369,7 @@ public class Spindexer {
} else { } else {
// Keep moving the spindexer // Keep moving the spindexer
moveSpindexerToPos(intakePositions[commandedIntakePosition]); moveSpindexerToPos(intakePositions[commandedIntakePosition]); // Possible error: should it be using "outakePositions" instead of "intakePositions"
} }
break; break;