feat:ftc2024-autonome.java mode 'Aurélien'
This commit is contained in:
parent
808c7e5bd5
commit
0ffed36498
1 changed files with 17 additions and 6 deletions
|
@ -42,13 +42,24 @@ public class ftc2024_autonome extends LinearOpMode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
double[][] operations = {
|
||||||
|
{3.0,-1.0,1.0} // operation 1: 3 sec , lm=-1 , rm = 1
|
||||||
|
};
|
||||||
//mode Aurelien
|
//mode Aurelien
|
||||||
while (opModeIsActive() && (runtime.seconds() <= 3.0)) {
|
for(int i = 0; i<operations.length; i++){
|
||||||
leftMotor.setPower(-1);
|
double time = operations[i][0];
|
||||||
rightMotor.setPower(-1);
|
double lmvalue = operations[i][1];
|
||||||
telemetry.addData("Leg 2", runtime.seconds());
|
double rmvalue = operations[i][2];
|
||||||
telemetry.update();
|
runtime.reset();
|
||||||
}
|
while (opModeIsActive() && (runtime.seconds() <= time)) {
|
||||||
|
lm.setPower(lmvalue);
|
||||||
|
rm.setPower(rmvalue);
|
||||||
|
telemetry.addData("Runtime Seconds", runtime.seconds());
|
||||||
|
telemetry.addData("current_operation",operations[i]);
|
||||||
|
telemetry.addData("current_op_id",i);
|
||||||
|
telemetry.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// run until the end of the match (driver presses STOP)
|
// run until the end of the match (driver presses STOP)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue