small misc changes

This commit is contained in:
brotherhobo
2024-07-21 22:52:25 -04:00
parent 70cfd3be44
commit a823aa7af7
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@ by Tyler Veness. However, the OTOS localizer uses its own onboard system for cal
which I do not know about.
## Setting Your Localizer
Go to line `69` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)`
Go to line `70` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)`
with the localizer that applies to you:
* If you're using drive encoders, put `new DriveEncoderLocalizer(hardwareMap)`
* If you're using two wheel odometry, put `new TwoWheelLocalizer(hardwareMap)`

View File

@ -59,6 +59,8 @@ public class TeleOpEnhancements extends OpMode {
public void loop() {
driveVector.setOrthogonalComponents(-gamepad1.left_stick_y, -gamepad1.left_stick_x);
driveVector.setMagnitude(MathFunctions.clamp(driveVector.getMagnitude(), 0, 1));
// TODO: if you want to make this field centric, then just remove this line
driveVector.rotateVector(follower.getPose().getHeading());
headingVector.setComponents(-gamepad1.left_stick_x, follower.getPose().getHeading());