update avion

This commit is contained in:
Zelina974 2024-04-05 17:04:44 +02:00
parent c4f0ac1b7a
commit a485d3a85d
2 changed files with 9 additions and 2 deletions

View file

@ -36,6 +36,7 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
private DcMotorEx rmelevator;
private DcMotorEx box;
private DcMotorEx rotation;
private Servo avion;
private ElapsedTime runtime = new ElapsedTime();
private RobotMode mode = RobotMode.ESSAIFRANCK;
@ -135,7 +136,8 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
box = hardwareMap.get(DcMotorEx.class, "boxRot");
box.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
box.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
rotation.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
avion = hardwareMap.get(Servo.class, "avion");
// box.setPositionPIDFCoefficients(5.0);
// rotation positions: 20° pos initiale par rapport au sol
@ -531,7 +533,7 @@ public class WEROBOT_FTC2024_New_carlike extends LinearOpMode {
}
if (gamepad1.right_bumper && gamepad1.left_bumper) {
// launch the plane
avion.setPosition(110);
}
telemetry.addData("x", x);

5
servo.java Normal file
View file

@ -0,0 +1,5 @@
package org.firstinspires.teamcode;
import com.qualcom.robotcore.harware.Servo;
name_servo.setPosition(something);