Merge branch 'master' of https://github.com/GZod01/ftc2024-robotcode
This commit is contained in:
commit
1f9fb4e807
1 changed files with 16 additions and 1 deletions
|
@ -97,7 +97,22 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
telemetry.update();
|
telemetry.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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},
|
||||||
|
|
Loading…
Reference in a new issue