Lesson 13.9: Complete CompetitionTeleOp.java
The OpMode should coordinate decisions. It should not repeat motor names, encoder modes, or power constants.
Use the Public Subsystem Methods
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
@TeleOp(name="Competition TeleOp")
public class CompetitionTeleOp extends OpMode {
private final RobotHardware robot = new RobotHardware();
@Override
public void init() {
robot.init(hardwareMap);
}
@Override
public void loop() {
robot.update();
if (gamepad1.right_bumper) {
robot.intake.collect();
} else if (gamepad1.left_bumper) {
robot.intake.eject();
} else {
robot.intake.stop();
}
if (gamepad1.a) {
robot.lift.moveToScore();
}
}
@Override
public void stop() {
robot.stopAll();
}
}
Notice what is absent. CompetitionTeleOp does not import DcMotor or CRServo. It does not know hardware configuration names. Those details already have owners.
Save the Project for Autonomous
Complete the project, then press Export. Lesson 15.5 can also read files from this completed lesson when you use the same browser.
If you move to another computer, import the exported Telemark project there. The export contains every Java file and the selected OpMode entry point.
Project Practice
Complete the driver controls and cleanup path. Run the checks before exporting.
Ready to move on?
Only mark complete if you genuinely understand the material. Your progress will be saved in this browser.
Stuck on this lesson?
Ask about anything on this page. It can see which lesson you have open and which part you are reading.