diff --git a/build.gradle b/build.gradle index c1f07ee..ac90875 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ import edu.wpi.first.gradlerio.deploy.roborio.RoboRIO - + plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2022.1.1" + id "edu.wpi.first.GradleRIO" version "2022.2.1" } sourceCompatibility = JavaVersion.VERSION_11 diff --git a/simgui-ds.json b/simgui-ds.json new file mode 100644 index 0000000..73cc713 --- /dev/null +++ b/simgui-ds.json @@ -0,0 +1,92 @@ +{ + "keyboardJoysticks": [ + { + "axisConfig": [ + { + "decKey": 65, + "incKey": 68 + }, + { + "decKey": 87, + "incKey": 83 + }, + { + "decKey": 69, + "decayRate": 0.0, + "incKey": 82, + "keyRate": 0.009999999776482582 + } + ], + "axisCount": 3, + "buttonCount": 4, + "buttonKeys": [ + 90, + 88, + 67, + 86 + ], + "povConfig": [ + { + "key0": 328, + "key135": 323, + "key180": 322, + "key225": 321, + "key270": 324, + "key315": 327, + "key45": 329, + "key90": 326 + } + ], + "povCount": 1 + }, + { + "axisConfig": [ + { + "decKey": 74, + "incKey": 76 + }, + { + "decKey": 73, + "incKey": 75 + } + ], + "axisCount": 2, + "buttonCount": 4, + "buttonKeys": [ + 77, + 44, + 46, + 47 + ], + "povCount": 0 + }, + { + "axisConfig": [ + { + "decKey": 263, + "incKey": 262 + }, + { + "decKey": 265, + "incKey": 264 + } + ], + "axisCount": 2, + "buttonCount": 6, + "buttonKeys": [ + 260, + 268, + 266, + 261, + 269, + 267 + ], + "povCount": 0 + }, + { + "axisCount": 0, + "buttonCount": 0, + "povCount": 0 + } + ] +} diff --git a/simgui.json b/simgui.json new file mode 100644 index 0000000..a47a9ab --- /dev/null +++ b/simgui.json @@ -0,0 +1,11 @@ +{ + "NTProvider": { + "types": { + "/FMSInfo": "FMSInfo", + "/LiveWindow/LED": "Subsystem", + "/LiveWindow/SwerveDrive": "Subsystem", + "/LiveWindow/SwerveModule": "Subsystem", + "/LiveWindow/Ungrouped/Scheduler": "Scheduler" + } + } +} diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 76c2e5e..355c44f 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -46,8 +46,8 @@ public class RobotContainer { private final LED m_robotLED = new LED(m_robotMap.LEDController); /* Controllers */ - private final XboxControllerRaw m_driverXbox = new XboxControllerRaw(OIConstants.XBOX_DRIVER_ID); - private final XboxControllerRaw m_operatorXbox = new XboxControllerRaw(OIConstants.XBOX_OPERATOR_ID); + private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID); + private final XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID); /** * The container for the robot. Contains subsystems, OI devices, and commands. @@ -77,25 +77,25 @@ public class RobotContainer { */ private void configureButtonBindings() { /* Driver Buttons */ - // new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON) - new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.Y_BUTTON) + new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON) + // new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.Y_BUTTON) .whenPressed(() -> m_robotSwerveDrive.m_gyro.reset()); - // new JoystickButton(getDriverJoystick(), XboxController.LEFT_BUMPER_BUTTON) - new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.LEFT_BUMPER_BUTTON) + new JoystickButton(getDriverJoystick(), XboxController.LEFT_BUMPER_BUTTON) + // new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.LEFT_BUMPER_BUTTON) .whenPressed(() -> m_robotSwerveDrive.highSpeed(false)); - // new JoystickButton(getDriverJoystick(), XboxController.RIGHT_BUMPER_BUTTON) - new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.RIGHT_BUMPER_BUTTON) + new JoystickButton(getDriverJoystick(), XboxController.RIGHT_BUMPER_BUTTON) + // new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.RIGHT_BUMPER_BUTTON) .whenPressed(() -> m_robotSwerveDrive.highSpeed(true)); /* Operator Buttons */ // activates "Lit Mode" - // new JoystickButton(getOperatorJoystick(), XboxController.A_BUTTON) - new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.A_BUTTON) + new JoystickButton(getOperatorJoystick(), XboxController.A_BUTTON) + // new XboxControllerRawButton(m_driverXbox, XboxControllerRaw.A_BUTTON) .whenPressed(() -> m_robotLED.setPattern(LEDPatterns.LAVA_RAINBOW)) .whenReleased(() -> m_robotLED.setPattern(LEDConstants.DEFAULT_PATTERN)); } @@ -124,17 +124,17 @@ public class RobotContainer { return m_operatorXbox; } - // /** - // * Add your docs here. - // */ - // public Joystick getOperatorJoystick() { - // return m_operatorXbox.getJoyStick(); - // } + /** + * Add your docs here. + */ + public Joystick getOperatorJoystick() { + return m_operatorXbox.getJoyStick(); + } - // /** - // * Add your docs here. - // */ - // public Joystick getDriverJoystick() { - // return m_driverXbox.getJoyStick(); - // } + /** + * Add your docs here. + */ + public Joystick getDriverJoystick() { + return m_driverXbox.getJoyStick(); + } }