This commit is contained in:
Antoine PerreaultE
2026-03-25 18:26:48 -04:00
parent 92b876e7b0
commit 69fe4a58d0

View File

@@ -50,12 +50,18 @@ public class RetourMilieuDroite extends Command {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
double[] BotPose = new double[6];
BotPose = limelight3g.getBotPoseBlue();
botx = BotPose[0];
boty = BotPose[1];
if(alliance.get() == Alliance.Blue){
angle = 0;
}
else{
angle = 180;
}
if(pigeon2.getYaw().getValueAsDouble() <355 || pigeon2.getYaw().getValueAsDouble() > 5){
if(pigeon2.getYaw().getValueAsDouble() >0 && pigeon2.getYaw().getValueAsDouble() <180){
drivetrain.setControl(drive.withRotationalRate(0.5));
}
@@ -63,6 +69,9 @@ public class RetourMilieuDroite extends Command {
drivetrain.setControl(drive.withRotationalRate(-0.5));
}
}
else{
}
}
// Called once the command ends or is interrupted.
@Override