feat:ftc2024-autonome.java mode 'Aurélien'

This commit is contained in:
GZod01 2024-01-28 17:03:21 +01:00
parent 808c7e5bd5
commit 0ffed36498

View file

@ -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];
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(); telemetry.update();
} }
}
} }
// run until the end of the match (driver presses STOP) // run until the end of the match (driver presses STOP)