Skip to content

Commit

Permalink
feat: tuning mode alert
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed May 20, 2024
1 parent 323973b commit d0e6642
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/main/java/org/team1540/robot2024/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.team1540.robot2024.subsystems.shooter.Shooter;
import org.team1540.robot2024.subsystems.tramp.Tramp;
import org.team1540.robot2024.subsystems.vision.AprilTagVision;
import org.team1540.robot2024.util.Alert;
import org.team1540.robot2024.util.CommandUtils;
import org.team1540.robot2024.util.PhoenixTimeSyncSignalRefresher;
import org.team1540.robot2024.util.auto.AutoCommand;
Expand Down Expand Up @@ -242,26 +243,25 @@ private void configureAutoRoutines() {
AutoManager autos = AutoManager.getInstance();
// Set up FF characterization routines
if (isTuningMode()) {
AutoManager.getInstance().add(
new AutoCommand(
"Drive FF Characterization",
new FeedForwardCharacterization(
drivetrain, drivetrain::runCharacterizationVolts, drivetrain::getCharacterizationVelocity
)
)
);

AutoManager.getInstance().add(
new AutoCommand(
"Flywheels FF Characterization",
new FeedForwardCharacterization(
shooter, volts -> shooter.setFlywheelVolts(volts, volts), () -> shooter.getLeftFlywheelSpeed() / 60
)
)
);

new Alert("Tuning mode enabled", Alert.AlertType.INFO).set(true);
autos.add(new AutoCommand(
"Drive FF Characterization",
new FeedForwardCharacterization(
drivetrain,
drivetrain::runCharacterizationVolts,
drivetrain::getCharacterizationVelocity)));
autos.add(new AutoCommand(
"Flywheels FF Characterization",
new FeedForwardCharacterization(
shooter,
volts -> shooter.setFlywheelVolts(volts, volts),
() -> shooter.getLeftFlywheelSpeed() / 60)));
autos.add(new AutoCommand(
"WheelRadiusChar",
new WheelRadiusCharacterization(
drivetrain, WheelRadiusCharacterization.Direction.COUNTER_CLOCKWISE)));
}
autos.add(new AutoCommand("WheelRadiusChar", new WheelRadiusCharacterization(drivetrain, WheelRadiusCharacterization.Direction.COUNTER_CLOCKWISE)));

autos.addDefault(new AutoCommand("Dwayne :skull:"));
autos.add(new AmpLanePADEF(drivetrain, shooter, indexer));
autos.add(new AmpLanePAEDF(drivetrain, shooter, indexer));
Expand Down

0 comments on commit d0e6642

Please sign in to comment.