This commit is contained in:
samuel desharnais
2026-03-28 20:50:33 -04:00
parent 755d79aa18
commit 673a7fcb82
7 changed files with 43 additions and 38 deletions

View File

@@ -37,7 +37,7 @@ public class Lancer extends Command {
// Called when the command is initially scheduled.
@Override
public void initialize() {
if(limeLight3G.getV()){vitesse = 410.57 * ((Math.sqrt(Math.pow(Math.abs(4.625594-botx), 2) + Math.pow(Math.abs(4.034536-boty), 2)))) + 2250;}
if(limeLight3G.getV()){}
pidController = new PIDController(0.0007, 0,0, 0.001);
timer.reset();
}
@@ -47,7 +47,7 @@ public class Lancer extends Command {
public void execute() {
double[] BotPose = new double[6];
if(limeLight3G.getV()){
if(!alliance.isPresent()){return;}
if(alliance.get() == Alliance.Blue){
BotPose = limeLight3G.getBotPoseBlue();
}
@@ -56,7 +56,8 @@ public class Lancer extends Command {
}
botx = BotPose[0];
boty = BotPose[1];
}
vitesse = 410.57 * ((Math.sqrt(Math.pow(Math.abs(4.625594-botx), 2) + Math.pow(Math.abs(4.034536-boty), 2)))) + 2250;
}
if(limeLight3G.getV()){
System.out.println(vitesse);