diff --git a/Robot2024/lib/build.gradle b/Robot2024/lib/build.gradle index 14b2ed2..de94e9c 100644 --- a/Robot2024/lib/build.gradle +++ b/Robot2024/lib/build.gradle @@ -41,8 +41,6 @@ dependencies { nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop) simulationRelease wpi.sim.enableRelease() - implementation 'edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:2023.4.3' - testImplementation 'junit:junit:4.13' } diff --git a/Robot2024/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java b/Robot2024/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java index df9e7af..7a2c83c 100644 --- a/Robot2024/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java +++ b/Robot2024/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java @@ -129,25 +129,17 @@ public interface Position { } /** - * Sets the desired setpoint to the current setpoint, and enables the pid - * controll + * Sets the desired setpoint to the current setpoint, and enables the PID. + * control. + * + *

Prefer calling this over calling {@link #setSetpoint(double)}. * * @param setpoint the position to go to */ - public void setSetpoint(double setpoint) { + public void setSetpoint(T setpoint) { if (!isEnabled()) { enable(); } - super.setSetpoint(setpoint); - } - - /** - * Sets the desired setpoint to the current setpoint, and enables the pid - * controll - * - * @param setpoint the position to go to - */ - public void setSetpoint(T setpoint) { setSetpoint(setpoint.getPos()); } diff --git a/Robot2024/lib/vendordeps/WPILibNewCommands.json b/Robot2024/lib/vendordeps/WPILibNewCommands.json new file mode 100644 index 0000000..67bf389 --- /dev/null +++ b/Robot2024/lib/vendordeps/WPILibNewCommands.json @@ -0,0 +1,38 @@ +{ + "fileName": "WPILibNewCommands.json", + "name": "WPILib-New-Commands", + "version": "1.0.0", + "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", + "frcYear": "2024", + "mavenUrls": [], + "jsonUrl": "", + "javaDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-java", + "version": "wpilib" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-cpp", + "version": "wpilib", + "libName": "wpilibNewCommands", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxarm32", + "linuxarm64", + "windowsx86-64", + "windowsx86", + "linuxx86-64", + "osxuniversal" + ] + } + ] +}