Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

clean up common DriverOI #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions src/main/java/com/team766/robot/common/DriverOI.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public DriverOI(Drive drive, JoystickReader leftJoystick, JoystickReader rightJo
> 0);
}

public void handleOI(Context context) {

@Override
protected void handlePre() {
// Negative because forward is negative in driver station
leftJoystickX =
-createJoystickDeadzone(leftJoystick.getAxis(InputConstants.AXIS_FORWARD_BACKWARD))
Expand All @@ -51,7 +51,10 @@ public void handleOI(Context context) {
rightJoystickY =
-createJoystickDeadzone(rightJoystick.getAxis(InputConstants.AXIS_LEFT_RIGHT))
* ControlConstants.MAX_ROTATIONAL_VELOCITY; // For steer
}

@Override
protected void handleOI(Context context) {
if (leftJoystick.getButtonPressed(InputConstants.BUTTON_RESET_GYRO)) {
drive.resetGyro();
}
Expand Down
Loading