vgft
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user