diff --git a/src/main/java/org/sert2521/powerup/util/Oi.kt b/src/main/java/org/sert2521/powerup/util/Oi.kt index a3c63dc..ff531b3 100644 --- a/src/main/java/org/sert2521/powerup/util/Oi.kt +++ b/src/main/java/org/sert2521/powerup/util/Oi.kt @@ -4,12 +4,16 @@ import edu.wpi.first.wpilibj.Joystick import edu.wpi.first.wpilibj.Preferences import edu.wpi.first.wpilibj.XboxController +// Driver joysticks. Left and right used for tank drive, only right used for arcade drive. val leftJoystick = Joystick(LEFT_STICK_PORT) val rightJoystick = Joystick(RIGHT_STICK_PORT) -val secondaryJoystick = Joystick(SECONDARY_STICK_PORT) +// Driver controller. Used in "controller" control mode. val controller = XboxController(CONTROLLER_PORT) +// Gunner joystick. +val secondaryJoystick = Joystick(SECONDARY_STICK_PORT) + val controlMode get() = Preferences.getInstance().getString("control_mode", null).let { when (it) {