-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e214ba0
commit 2cca334
Showing
5 changed files
with
121 additions
and
58 deletions.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/HWTEST.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,40 @@ | ||
package org.firstinspires.ftc.teamcode.opmode; | ||
|
||
import com.acmerobotics.roadrunner.geometry.Pose2d; | ||
import com.acmerobotics.roadrunner.geometry.Vector2d; | ||
import com.qualcomm.robotcore.eventloop.opmode.Disabled; | ||
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; | ||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | ||
|
||
import org.firstinspires.ftc.teamcode.drive.Robot; | ||
import org.firstinspires.ftc.teamcode.drive.TrackingWheelLocalizer; | ||
import org.firstinspires.ftc.teamcode.drive.TrajectoryDrive; | ||
|
||
|
||
@TeleOp | ||
// -34502 to -35218 -716 | ||
// -18503 to -19233 -730 | ||
// -14975 to -14200 | ||
public class HWTEST extends LinearOpMode { | ||
|
||
@Override | ||
public void runOpMode() throws InterruptedException { | ||
// TestBotDrive drive = new TestBotDrive(hardwareMap); | ||
Robot robot = Robot.thisRobot(hardwareMap); | ||
TrajectoryDrive drive = robot.getDrive(); | ||
waitForStart(); | ||
while (opModeIsActive()) { | ||
Vector2d input = new Vector2d(-gamepad1.left_stick_y, -gamepad1.left_stick_x); | ||
drive.setWeightedDrivePower(new Pose2d(input.getX(), input.getY(), -gamepad1.right_stick_x)); | ||
drive.update(); | ||
|
||
android.util.Log.i("TESTODO", "LEFT " + ((TrackingWheelLocalizer) drive.getLocalizer()).leftEncoder.getCurrentPosition()); | ||
android.util.Log.i("TESTODO", "RIGHT " + ((TrackingWheelLocalizer) drive.getLocalizer()).rightEncoder.getCurrentPosition()); | ||
android.util.Log.i("TESTODO", "CENTER " + ((TrackingWheelLocalizer) drive.getLocalizer()).frontEncoder.getCurrentPosition()); | ||
|
||
|
||
|
||
} | ||
|
||
} | ||
} |
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