FreeOfCharge2022-23/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/AutoModeTest.java
nn2wg eaa9343791 motor control is moved to MotorControl.java
untested code
probably doesn't work
pushing to main anyways
2021-10-26 18:32:00 -05:00

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();
}
}