Skip to content
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
63 changes: 0 additions & 63 deletions src/main/java/com/overture/lib/gamepads/OverXboxController.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,69 +143,6 @@ public Command getRumbleCommand(double intensity) {
return Commands.runOnce(() -> setRumble(GenericHID.RumbleType.kBothRumble, intensity));
}

/**
* Returns a trigger for the left stick being pushed past a threshold on the y axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger leftYTrigger(double triggerThreshold) {
return new Trigger(() -> Math.abs(getLeftY()) >= triggerThreshold);
}

/**
* Returns a trigger for the left stick being pushed past a threshold on the x axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger leftXTrigger(double triggerThreshold) {
return new Trigger(() -> Math.abs(getLeftX()) >= triggerThreshold);
}

/**
* Returns a trigger for the right stick being pushed past a threshold on the y axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger rightYTrigger(double triggerThreshold) {
return new Trigger(() -> Math.abs(getRightY()) >= triggerThreshold);
}

/**
* Returns a trigger for the right stick being pushed past a threshold on the x axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger rightXTrigger(double triggerThreshold) {
return new Trigger(() -> Math.abs(getRightX()) >= triggerThreshold);
}

/**
* Returns a trigger for the right stick being pushed past a threshold on either axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger rightStick(double triggerThreshold) {
return new Trigger(
() ->
Math.abs(getRightX()) >= triggerThreshold || Math.abs(getRightY()) >= triggerThreshold);
}

/**
* Returns a trigger for the left stick being pushed past a threshold on either axis.
*
* @param triggerThreshold the threshold to exceed
* @return the trigger
*/
public Trigger leftStick(double triggerThreshold) {
return new Trigger(
() -> Math.abs(getLeftX()) >= triggerThreshold || Math.abs(getLeftY()) >= triggerThreshold);
}

/** Publishes the connection state of the controller. */
public void updateTelemetry() {
isConnectedAlert.set(!isConnected());
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/overture/lib/robots/OverContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ public interface OverContainer {
/** Configures the operator's button bindings. */
void configOperatorBindings();

/** Configures the default commands of every subsystem. */
void configDefaultCommands();

/** Configures the bindings used for characterization routines. */
void configCharacterizationBindings();

Expand Down