use of com.team2753.splines.FollowerDrive in project Relic_Main by TeamOverdrive.
the class TestFollowerWheel method runOpMode.
@Override
public void runOpMode() throws InterruptedException {
Drive mDrive = new Drive();
mDrive.init(this, true);
mDrive.zeroSensors();
FollowerWheel mFollow = new FollowerWheel();
mFollow.init(this, false);
FollowerDrive followerDrive = new FollowerDrive(mDrive, mFollow);
telemetry.addData("Hello", "");
telemetry.update();
waitForStart();
ElapsedTime t = new ElapsedTime();
mDrive.setRunMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
mDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
while (opModeIsActive()) {
followerDrive.update();
telemetry.addData("X", followerDrive.getX());
telemetry.addData("Y", followerDrive.getY());
telemetry.addData("Radius", followerDrive.radius());
telemetry.addData("Angle", followerDrive.angle());
telemetry.addData("Real Angle", mDrive.getGyroAngleRadians());
telemetry.update();
}
mDrive.setLeftRightPower(0, 0);
telemetry.addData("X", followerDrive.getX());
telemetry.addData("Y", followerDrive.getY());
telemetry.update();
while (opModeIsActive()) Thread.yield();
}
Aggregations