eaa9343791
untested code probably doesn't work pushing to main anyways
38 lines
1.1 KiB
Java
38 lines
1.1 KiB
Java
package org.firstinspires.ftc.teamcode;
|
|
|
|
|
|
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
|
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
|
|
import com.qualcomm.robotcore.hardware.DcMotor;
|
|
|
|
@Autonomous
|
|
public class AutoModeTest extends LinearOpMode {
|
|
private DcMotor frontRight, frontLeft, rearRight, rearLeft;
|
|
private double drive, strafe, turn;
|
|
private double driveMult = 0.25;
|
|
|
|
@Override
|
|
public void runOpMode(){
|
|
initParts();
|
|
|
|
}
|
|
|
|
|
|
public void initParts(){
|
|
frontRight = hardwareMap.get(DcMotor.class, "frontRight");
|
|
frontLeft = hardwareMap.get(DcMotor.class, "frontLeft");
|
|
rearRight = hardwareMap.get(DcMotor.class, "rearRight");
|
|
rearLeft = hardwareMap.get(DcMotor.class, "rearLeft");
|
|
|
|
// turns on encoders
|
|
frontRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
|
|
frontLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
|
|
rearRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
|
|
rearLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
|
|
|
|
// telemetry messages
|
|
telemetry.addData("Status", "Initialized");
|
|
telemetry.update();
|
|
}
|
|
}
|