helhfoahfaohf
This commit is contained in:
parent
9e9b6cdba2
commit
832b2dca1b
1 changed files with 7 additions and 1 deletions
|
@ -34,7 +34,9 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
|
|||
if(gamepad1.a && !already_a){
|
||||
if(mode=="normal"){
|
||||
mode="tank";
|
||||
}else{
|
||||
}else if(mode=="tank"){
|
||||
mode = "essaifranck";
|
||||
}else{
|
||||
mode="normal";
|
||||
}
|
||||
already_a = true;
|
||||
|
@ -54,6 +56,10 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
|
|||
lpower = -gamepad1.left_stick_y;
|
||||
rpower = gamepad1.right_stick_y;
|
||||
}
|
||||
else if (mode=="essaifranck"){
|
||||
lpower = (gamepad1.left_stick_x-gamepad1.left_stick_y)/Math.pow(2,1/2);
|
||||
rpower = (gamepad1.left_stick_y-gamepad1.left_stick_x)/Math.pow(2,1/2);
|
||||
}
|
||||
if(!(gamepad1.left_bumper)){
|
||||
lpower/=3;
|
||||
rpower/=3;
|
||||
|
|
Loading…
Reference in a new issue