forked from FIRST-Tech-Challenge/FtcRobotController
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPestoDrive.java
More file actions
36 lines (28 loc) · 1.16 KB
/
Copy pathPestoDrive.java
File metadata and controls
36 lines (28 loc) · 1.16 KB
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
30
31
32
33
34
35
36
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.shprobotics.pestocore.devices.GamepadKey;
import com.shprobotics.pestocore.processing.FrontalLobe;
import com.shprobotics.pestocore.processing.MotorCortex;
import org.firstinspires.ftc.teamcode.BaseRobot;
@TeleOp
public class PestoDrive extends BaseRobot {
@Override
public void runOpMode() {
PestoFTCConfig.initializePinpoint = true;
super.runOpMode();
while (opModeIsActive() && !isStopRequested()) {
MotorCortex.update();
tracker.update();
if (gamepad1.b) {
tracker.reset();
teleOpController.resetIMU();
}
teleOpController.driveFieldCentric(-gamepad1.left_stick_y, gamepad1.left_stick_x, gamepad1.right_stick_x);
telemetry.addData("x", tracker.getCurrentPosition().getX());
telemetry.addData("y", tracker.getCurrentPosition().getY());
telemetry.addData("r", tracker.getCurrentPosition().getHeadingRadians());
telemetry.update();
}
}
}