forked from FIRST-Tech-Challenge/FtcRobotController
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeleopV2.java
More file actions
29 lines (22 loc) · 853 Bytes
/
TeleopV2.java
File metadata and controls
29 lines (22 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
@TeleOp(name = "TeleII", group = "Anti-non-Gm0")
public class TeleopV2 extends LinearOpMode {//Make sure the class extends OpMode
@Override
public void runOpMode() throws InterruptedException {
Drivebase mecanumDrive;
mecanumDrive = new Drivebase();
mecanumDrive.init(hardwareMap);
Main robot = new Main();
robot.init(hardwareMap);
telemetry.addLine("Robot initialized");
telemetry.update();
waitForStart();
while(opModeIsActive()){
//drive the robot
mecanumDrive.update(gamepad1, hardwareMap); //handle drive-specific computation
robot.update(telemetry);
}
}
}