Skip to content

Commit

Permalink
Merge branch 'main' into auto-number-one
Browse files Browse the repository at this point in the history
  • Loading branch information
willitcode authored Feb 17, 2024
2 parents c5d3891 + d4c8af4 commit 53757c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static class MailboxBelts {
public static class Controllers {
/** Driver station port number for the drive controller. */
public static final int DRIVER_CONTROLLER_PORT = 0;

/** Axis deadband for driver controller. */
public static double DRIVER_CONTROLLER_DEADBAND = 0.1;
}

/** Constants for the Drivetrain */
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public Command getAutonomousCommand() {
}

private static double scaleAxis(double axis) {
double deadbanded = MathUtil.applyDeadband(axis, 0.1);
double deadbanded =
MathUtil.applyDeadband(axis, Constants.Controllers.DRIVER_CONTROLLER_DEADBAND);
return Math.pow(deadbanded, 3);
}

Expand Down

0 comments on commit 53757c5

Please sign in to comment.