erreurs corrigées
This commit is contained in:
parent
0cbc68e0e9
commit
b770f1a271
1 changed files with 23 additions and 22 deletions
|
@ -41,7 +41,7 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
|
|||
y = gamepad1.left_stick_y;
|
||||
t= gamepad1.right_trigger;
|
||||
t2 = helloexp(t);
|
||||
t3 = helloexp(Math.sqrt(x^2+y^2))
|
||||
t3 = helloexp(Math.sqrt(Math.pow(x,2)+Math.pow(y,2)));
|
||||
telemetry.addData("Status", "Running");
|
||||
if(gamepad1.a && !already_a){
|
||||
if(mode=="normal"){
|
||||
|
@ -81,8 +81,9 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
|
|||
double a = (-y+x)/Math.pow(2,1/2);
|
||||
double b = (-y-x)/Math.pow(2,1/2);
|
||||
double vmean = (Math.abs(a)+Math.abs(b))/2;
|
||||
lpower = (a/vmean)*t3
|
||||
rpower = (b/vmean)*t3
|
||||
lpower = (a/vmean)*t3;
|
||||
rpower = (b/vmean)*t3;
|
||||
}
|
||||
if(!(gamepad1.left_bumper)){
|
||||
lpower/=3;
|
||||
rpower/=3;
|
||||
|
|
Loading…
Reference in a new issue