This commit is contained in:
Zelina974 2024-02-11 16:42:38 +01:00
commit 1f9fb4e807

View file

@ -98,6 +98,21 @@ public class ftc2024_autonome extends LinearOpMode {
} }
} }
else{ else{
while(opModeIsActive()){
Yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
if(Math.abs(Yaw-90.0)<=0.01){
break;
}
else if((Yaw - 90.0) <0){
lm.setPower((Math.abs(Yaw-90.0)/90)*0.5);
rm.setPower(-(Math.abs(Yaw-90.0)/90)*0.5);
}
else{
rm.setPower((Math.abs(Yaw-90.0)/90)*0.5);
lm.setPower(-(Math.abs(Yaw-90.0)/90)*0.5);
}
if(false){
double[][] operations = { double[][] operations = {
{-1.0,1.0}, // vectors {-1.0,1.0}, // vectors
{1.0,1.0}, {1.0,1.0},