erreurs corrigées

This commit is contained in:
Zelina974 2024-01-07 15:24:45 +01:00 committed by GitHub
parent 0cbc68e0e9
commit b770f1a271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;