fixe errors
This commit is contained in:
parent
2605535899
commit
ff8e4bf295
1 changed files with 43 additions and 41 deletions
|
@ -17,6 +17,7 @@ import com.qualcomm.robotcore.hardware.IMU;
|
||||||
import org.firstinspires.ftc.robotcore.external.navigation.YawPitchRollAngles;
|
import org.firstinspires.ftc.robotcore.external.navigation.YawPitchRollAngles;
|
||||||
import com.qualcomm.robotcore.hardware.ImuOrientationOnRobot;
|
import com.qualcomm.robotcore.hardware.ImuOrientationOnRobot;
|
||||||
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
||||||
|
|
||||||
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
|
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
|
||||||
import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder;
|
import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder;
|
||||||
import org.firstinspires.ftc.robotcore.external.navigation.AxesReference;
|
import org.firstinspires.ftc.robotcore.external.navigation.AxesReference;
|
||||||
|
@ -88,7 +89,7 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
telemetry.update();
|
telemetry.update();
|
||||||
yaw_sortie = Yaw;
|
yaw_sortie = Yaw;
|
||||||
}
|
}
|
||||||
telemetry.addData("yaw_sortie", yaw_sortie)
|
telemetry.addData("yaw_sortie", yaw_sortie);
|
||||||
runtime.reset();
|
runtime.reset();
|
||||||
while (opModeIsActive() && (runtime.seconds() <= 121.92e-2/speed)) {
|
while (opModeIsActive() && (runtime.seconds() <= 121.92e-2/speed)) {
|
||||||
lm.setPower(0.1);
|
lm.setPower(0.1);
|
||||||
|
@ -111,7 +112,7 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
rm.setPower((Math.abs(Yaw-90.0)/90)*0.5);
|
rm.setPower((Math.abs(Yaw-90.0)/90)*0.5);
|
||||||
lm.setPower(-(Math.abs(Yaw-90.0)/90)*0.5);
|
lm.setPower(-(Math.abs(Yaw-90.0)/90)*0.5);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(false){
|
if(false){
|
||||||
double[][] operations = {
|
double[][] operations = {
|
||||||
{-1.0,1.0}, // vectors
|
{-1.0,1.0}, // vectors
|
||||||
|
@ -133,6 +134,7 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
double lmvalue = (a/vmean);
|
double lmvalue = (a/vmean);
|
||||||
double rmvalue = (b/vmean);
|
double rmvalue = (b/vmean);
|
||||||
runtime.reset();
|
runtime.reset();
|
||||||
|
|
||||||
while (opModeIsActive() && (runtime.seconds() <= time)) {
|
while (opModeIsActive() && (runtime.seconds() <= time)) {
|
||||||
lm.setPower(lmvalue);
|
lm.setPower(lmvalue);
|
||||||
rm.setPower(rmvalue);
|
rm.setPower(rmvalue);
|
||||||
|
@ -140,7 +142,6 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
telemetry.addData("current_operation",operations[i]);
|
telemetry.addData("current_operation",operations[i]);
|
||||||
telemetry.addData("current_op_id",i);
|
telemetry.addData("current_op_id",i);
|
||||||
|
|
||||||
|
|
||||||
telemetry.update();
|
telemetry.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,4 +158,5 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue