Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drivetrain fixes #166

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/backleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": -10.875,
"left": 10
},
"absoluteEncoderOffset": 56.5,
"absoluteEncoderOffset": 236,
"drive": {
"type": "sparkmax",
"id": 8,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/backright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": -10.875,
"left": -10
},
"absoluteEncoderOffset": 209.9,
"absoluteEncoderOffset": 213.8,
"drive": {
"type": "sparkmax",
"id": 5,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/frontleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 10.875,
"left": 10
},
"absoluteEncoderOffset": 260.5,
"absoluteEncoderOffset": 76.7,
"drive": {
"type": "sparkmax",
"id": 9,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/frontright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 10.875,
"left": -10
},
"absoluteEncoderOffset": 1.5,
"absoluteEncoderOffset": 2.34,
"drive": {
"type": "sparkmax",
"id": 3,
Expand Down
12 changes: 5 additions & 7 deletions src/main/java/frc/robot/Controllers.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,19 @@ public final class Controllers {
private static XboxController rawOpXboxController = operatorController.getHID();

/** When this supplier returns true, the robot should snap towards the opposing alliance wall. */
public static Supplier<Boolean> headingSnappingUpSupplier =
() -> rawPilotController.getPOV() == 0;
public static Supplier<Boolean> headingSnappingUpSupplier = () -> rawPilotController.getYButton();

/** When this supplier returns true, the robot should snap towards the right side of the field. */
public static Supplier<Boolean> headingSnappingRightSupplier =
() -> rawPilotController.getPOV() == 90;
() -> rawPilotController.getBButton();

/** When this supplier returns true, the robot should snap towards our alliance wall. */
public static Supplier<Boolean> headingSnappingDownSupplier =
() -> rawPilotController.getPOV() == 180;
() -> rawPilotController.getAButton();

/** When this supplier returns true, the robot should snap towards the left side of the field. */
public static Supplier<Boolean> headingSnappingLeftSupplier =
() -> rawPilotController.getPOV() == 270;
() -> rawPilotController.getXButton();

/** Shuffleboard (NT) entry for the keymap selector */
public static GenericEntry keymapEntry =
Expand Down Expand Up @@ -104,7 +103,7 @@ private static void configureDefaultKeybinds() {
operatorController.povDown().whileTrue(RobotContainer.runIntakeReverse);
operatorController.leftTrigger().whileTrue(RobotContainer.aimToAmp);
operatorController.rightTrigger().whileTrue(RobotContainer.fireNote);
pilotController.leftTrigger().toggleOnTrue(RobotContainer.driveFieldOriented);
pilotController.leftBumper().whileTrue(RobotContainer.driveFieldOrientedSprint);

/* TODO: angle / velocity steering toggle w/ right trigger (no issue) */

Expand All @@ -116,7 +115,6 @@ private static void configureDefaultKeybinds() {
* bound to pilotController)
*/
private static void configureOperatorlessKeybinds() {
pilotController.leftStick().toggleOnTrue(RobotContainer.driveFieldOriented);
/* TODO: angle / velocity steering toggle w/ right stick (no issue) and boost on right bumper (issue 86) */
pilotController.povDown().whileTrue(RobotContainer.runIntakeReverse);
pilotController.povUp().toggleOnTrue(RobotContainer.enterXMode);
Expand Down
Loading