This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...ava/org/firstinspires/ftc/teamcode/OpModes/Autonomous/Examples/TestCoordinateDriving.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.firstinspires.ftc.teamcode.OpModes.Autonomous.Examples; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.qualcomm.robotcore.eventloop.opmode.Disabled; | ||
|
||
import org.firstinspires.ftc.teamcode.OpModes.Autonomous.BaseAutonomous; | ||
import org.firstinspires.ftc.teamcode.Tools.Chassis.Chassi; | ||
import org.firstinspires.ftc.teamcode.Tools.Chassis.MecanumChassi; | ||
import org.firstinspires.ftc.teamcode.Tools.DTypes.Position2D; | ||
import org.firstinspires.ftc.teamcode.Tools.FieldNavigation; | ||
import org.firstinspires.ftc.teamcode.Tools.Robot; | ||
|
||
@Autonomous(name="Test Coordinates Driving", group="Examples") | ||
//@Disabled | ||
public class TestCoordinateDriving extends BaseAutonomous { | ||
private Robot robot; | ||
private Chassi chassi; | ||
private FieldNavigation navi; | ||
|
||
@Override | ||
public void initialize() { | ||
navi = new FieldNavigation(); | ||
chassi = new MecanumChassi(); | ||
chassi.setRotationAxis(1); | ||
chassi.populateMotorArray(hardwareMap); | ||
|
||
robot = new Robot(navi, chassi); | ||
} | ||
|
||
@Override | ||
public void run() { | ||
robot.drive(new Position2D(100.0, 0.0)); | ||
|
||
while (opModeIsActive()) { | ||
robot.step(); | ||
telemetry.addLine(chassi.debug()); | ||
telemetry.addLine(navi.debug()); | ||
telemetry.update(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters