hafoihh
This commit is contained in:
parent
e1a6059f8c
commit
ebdf086efc
1 changed files with 3 additions and 3 deletions
|
@ -67,9 +67,9 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
|
||||||
rpower = gamepad1.right_stick_y;
|
rpower = gamepad1.right_stick_y;
|
||||||
}
|
}
|
||||||
else if (mode=="essaifranck"){
|
else if (mode=="essaifranck"){
|
||||||
double a = (x+y)/Math.pow(2,1/2);
|
double a = (y+x)/Math.pow(2,1/2);
|
||||||
double b = (x-y)/Math.pow(2,1/2);
|
double b = (y-x)/Math.pow(2,1/2);
|
||||||
double vmean = (a+b)/2;
|
double vmean = (Math.abs(a)+Math.abs(b))/2;
|
||||||
lpower = (a/vmean)*t2;
|
lpower = (a/vmean)*t2;
|
||||||
rpower = (b/vmean)*t2;
|
rpower = (b/vmean)*t2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue