feat:ftc2024-carlike.java

This commit is contained in:
GZod01 2024-01-07 16:24:24 +01:00
parent 3e8d91cf96
commit e9ab840f45

View file

@ -43,14 +43,17 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
telemetry.update(); telemetry.update();
lm = hardwareMap.get(DcMotor.class, "blm"); lm = hardwareMap.get(DcMotor.class, "blm");
rm = hardwareMap.get(DcMotor.class, "brm"); rm = hardwareMap.get(DcMotor.class, "brm");
IMU.Parameters parameters = new IMU.Parameters();
parameters.mode = IMU.SensorMode.IMU;
parameters.angleUnit = IMU.AngleUnit.DEGREES;
parameters.accelUnit = IMU.AccelUnit.METERS_PERSEC_PERSEC;
parameters.loggingEnabled = false;
imu = hardwareMap.get(IMU.class, "imu"); imu = hardwareMap.get(IMU.class, "imu");
imu.initialize(parameters); imu.initialize(
new IMU.Parameters(
new RevHubOrientationOnRobot(
RevHubOrientationOnRobot.LogoFacingDirection.UP,
RevHubOrientationOnRobot.UsbFacingDirection.FORWARD
)
)
);
rm.setDirection(DcMotorSimple.Direction.REVERSE); rm.setDirection(DcMotorSimple.Direction.REVERSE);
telemetry.addData("Mode", "calibrating..."); telemetry.addData("Mode", "calibrating...");
telemetry.update(); telemetry.update();