fix
This commit is contained in:
parent
df33d5290c
commit
da49742d7c
1 changed files with 5 additions and 5 deletions
10
test.java
10
test.java
|
@ -30,7 +30,7 @@ public class ftc2024_autonome_test extends LinearOpMode {
|
||||||
lm = hardwareMap.get (DcMotor.class, "lm");
|
lm = hardwareMap.get (DcMotor.class, "lm");
|
||||||
rm = hardwareMap.get (DcMotor.class, "rm");
|
rm = hardwareMap.get (DcMotor.class, "rm");
|
||||||
|
|
||||||
rm.setDirection(DcMotorSimple.Direction.REVERSE);
|
rm.setDirection(DcMotor.Direction.REVERSE);
|
||||||
|
|
||||||
imu = hardwareMap.get(IMU.class, "imu");
|
imu = hardwareMap.get(IMU.class, "imu");
|
||||||
imu.initialize(
|
imu.initialize(
|
||||||
|
@ -42,10 +42,10 @@ public class ftc2024_autonome_test extends LinearOpMode {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
imu.resetYaw();
|
imu.resetYaw();
|
||||||
|
|
||||||
YawPitchRollAngles robotOrientation;
|
YawPitchRollAngles robotOrientation;
|
||||||
|
robotOrientation = imu.getRobotYawPitchRollAngles();
|
||||||
double Yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
|
double Yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
|
||||||
double yaw_sortie;
|
double yaw_sortie = 0.0;
|
||||||
|
|
||||||
waitForStart();
|
waitForStart();
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ public class ftc2024_autonome_test extends LinearOpMode {
|
||||||
double [] x = new double[lm_p.length];
|
double [] x = new double[lm_p.length];
|
||||||
for(int i = 0; i< lm_p.length; i++){
|
for(int i = 0; i< lm_p.length; i++){
|
||||||
while (opModeIsActive() && Yaw < 90){
|
while (opModeIsActive() && Yaw < 90){
|
||||||
lm.setPower = lm_p[i];
|
lm.setPower(lm_p[i]);
|
||||||
rm.setPower = rm_p[i];
|
rm.setPower(rm_p[i]);
|
||||||
Yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
|
Yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
|
||||||
telemetry.addData("Yaw : ", Yaw);
|
telemetry.addData("Yaw : ", Yaw);
|
||||||
telemetry.update();
|
telemetry.update();
|
||||||
|
|
Loading…
Reference in a new issue