mode auto

This commit is contained in:
Antoine PerreaultE
2026-04-01 19:27:12 -04:00
parent 56b28100df
commit b0ad34519e
5 changed files with 49 additions and 34 deletions

View File

@@ -19,15 +19,13 @@ public class Inverser extends Command {
// Called when the command is initially scheduled.
@Override
public void initialize() {}
public void initialize() {
drivetrain.getPigeon2().setYaw(drivetrain.getPigeon2().getYaw().getValueAsDouble()+180);
}
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if(!inverse){
drivetrain.getPigeon2().setYaw(drivetrain.getPigeon2().getYaw().getValueAsDouble()+180);
inverse = true;
}
}
// Called once the command ends or is interrupted.