Skip to content

Commit

Permalink
Revert deadband until better fix
Browse files Browse the repository at this point in the history
  • Loading branch information
towner-10 committed Feb 19, 2020
1 parent d2ebca1 commit 5865ec6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/viking/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ public Controller(int port) {
}

public double getControllerLeftStickX() {
if (controller.getRawAxis(0) < lJoystickDeadbandX) return 0;
//if (controller.getRawAxis(0) < lJoystickDeadbandX) return 0;
return controller.getRawAxis(0);
}

public double getControllerLeftStickY() {
if (controller.getRawAxis(1) * -1 < lJoystickDeadbandY) return 0;
//if (controller.getRawAxis(1) * -1 < lJoystickDeadbandY) return 0;
return controller.getRawAxis(1) * -1;
}

public double getControllerRightStickX() {
if (controller.getRawAxis(4) < rJoystickDeadbandX) return 0;
//if (controller.getRawAxis(4) < rJoystickDeadbandX) return 0;
return controller.getRawAxis(4);
}

public double getControllerRightStickY() {
if (controller.getRawAxis(5) < rJoystickDeadbandY) return 0;
//if (controller.getRawAxis(5) < rJoystickDeadbandY) return 0;
return controller.getRawAxis(5);
}

public double getControllerLTrigger() {
if (controller.getRawAxis(2) < lTriggerDeadband) return 0;
//if (controller.getRawAxis(2) < lTriggerDeadband) return 0;
return controller.getRawAxis(2);
}

public double getControllerRTrigger() {
if (controller.getRawAxis(3) < rTriggerDeadband) return 0;
//if (controller.getRawAxis(3) < rTriggerDeadband) return 0;
return controller.getRawAxis(3);
}

Expand Down

0 comments on commit 5865ec6

Please sign in to comment.