hel
This commit is contained in:
parent
2499919db9
commit
0bc2ddff91
1 changed files with 4 additions and 5 deletions
|
@ -184,7 +184,7 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
|
||||||
|
|
||||||
|
|
||||||
if (gamepad1.right_bumper && gamepad1.left_bumper && gamepad1.a){
|
if (gamepad1.right_bumper && gamepad1.left_bumper && gamepad1.a){
|
||||||
avion.setPosition(1);
|
avion.setPosition(0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Choix mode conduite / actif en manuel et auto
|
// Choix mode conduite / actif en manuel et auto
|
||||||
|
@ -233,7 +233,8 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
|
||||||
// double rapp = step/theta;
|
// double rapp = step/theta;
|
||||||
double signe = Math.signum(-y);
|
double signe = Math.signum(-y);
|
||||||
signe = (signe == 0)?1.0:signe;
|
signe = (signe == 0)?1.0:signe;
|
||||||
if (Math.abs(x)<=0.1){
|
if(Math.abs(x)<=0.1 && Math.abs(y)<=0.1) ltargetpos = rtargetpos = 0;
|
||||||
|
else if (Math.abs(x)<=0.1){
|
||||||
ltargetPos = rtargetPos = 100;
|
ltargetPos = rtargetPos = 100;
|
||||||
}else if (isBetween(x,0.1,0.9)){
|
}else if (isBetween(x,0.1,0.9)){
|
||||||
rtargetPos = step;
|
rtargetPos = step;
|
||||||
|
@ -536,9 +537,7 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gamepad1.right_bumper && gamepad1.left_bumper) {
|
|
||||||
avion.setPosition(110);
|
|
||||||
}
|
|
||||||
|
|
||||||
telemetry.addData("x", x);
|
telemetry.addData("x", x);
|
||||||
telemetry.addData("y", y);
|
telemetry.addData("y", y);
|
||||||
|
|
Loading…
Reference in a new issue