Skip to content

Commit ea04f41

Browse files
committed
Fix joysticks and refactor
1 parent 46ba3a8 commit ea04f41

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public RobotContainer() {
5151
// Turning is controlled by the X axis of the right stick.
5252
new RunCommand(
5353
() -> m_robotDrive.drive(
54-
MathUtil.applyDeadband(m_driverController.getLeftY(), OIConstants.kDriveDeadband),
55-
MathUtil.applyDeadband(m_driverController.getLeftX(), OIConstants.kDriveDeadband),
56-
MathUtil.applyDeadband(m_driverController.getRightX(), OIConstants.kDriveDeadband),
54+
-MathUtil.applyDeadband(m_driverController.getLeftY(), OIConstants.kDriveDeadband),
55+
-MathUtil.applyDeadband(m_driverController.getLeftX(), OIConstants.kDriveDeadband),
56+
-MathUtil.applyDeadband(m_driverController.getRightX(), OIConstants.kDriveDeadband),
5757
true, true),
5858
m_robotDrive));
5959
}

src/main/java/frc/robot/subsystems/DriveSubsystem.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public void resetOdometry(Pose2d pose) {
114114
* @param rot Angular rate of the robot.
115115
* @param fieldRelative Whether the provided x and y speeds are relative to the
116116
* field.
117+
* @param rateLimit Whether to enable rate limiting for smoother control.
117118
*/
118119
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative, boolean rateLimit) {
119120

@@ -239,12 +240,4 @@ public double getHeading() {
239240
public double getTurnRate() {
240241
return m_gyro.getRate() * (DriveConstants.kGyroReversed ? -1.0 : 1.0);
241242
}
242-
243-
/*@Override
244-
public void initSendable(SendableBuilder builder) {
245-
super.initSendable(builder);
246-
builder.addDoubleProperty("Magnitude Commanded", () -> magCommanded, null);
247-
//builder.addBooleanProperty("At Setpoint", () -> atSetpoint(), null);
248-
//addChild("Controller", m_controller);
249-
}*/
250243
}

0 commit comments

Comments
 (0)