diff --git a/.gitignore b/.gitignore index cdbfbfaa..9a9ca7be 100644 --- a/.gitignore +++ b/.gitignore @@ -169,6 +169,8 @@ out/ .fleet # Simulation GUI and other tools window save file +networktables.json +simgui.json *-window.json # Simulation data log directory @@ -176,3 +178,10 @@ logs/ # Folder that has CTRE Phoenix Sim device config storage ctre_sim/ + +# clangd +/.cache +compile_commands.json + +# Eclipse generated file for annotation processors +.factorypath diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e786f6c..dccbc7c3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,5 +26,35 @@ }, ], "java.test.defaultConfig": "WPIlibUnitTests", - "java.debug.settings.onBuildFailureProceed": true + "java.import.gradle.annotationProcessing.enabled": false, + "java.completion.favoriteStaticMembers": [ + "org.junit.Assert.*", + "org.junit.Assume.*", + "org.junit.jupiter.api.Assertions.*", + "org.junit.jupiter.api.Assumptions.*", + "org.junit.jupiter.api.DynamicContainer.*", + "org.junit.jupiter.api.DynamicTest.*", + "org.mockito.Mockito.*", + "org.mockito.ArgumentMatchers.*", + "org.mockito.Answers.*", + "edu.wpi.first.units.Units.*" + ], + "java.completion.filteredTypes": [ + "java.awt.*", + "com.sun.*", + "sun.*", + "jdk.*", + "org.graalvm.*", + "io.micrometer.shaded.*", + "java.beans.*", + "java.util.Base64.*", + "java.util.Timer", + "java.sql.*", + "javax.swing.*", + "javax.management.*", + "javax.smartcardio.*", + "edu.wpi.first.math.proto.*", + "edu.wpi.first.math.**.proto.*", + "edu.wpi.first.math.**.struct.*", + ] } diff --git a/.wpilib/wpilib_preferences.json b/.wpilib/wpilib_preferences.json index 37d6edb2..12c2441d 100644 --- a/.wpilib/wpilib_preferences.json +++ b/.wpilib/wpilib_preferences.json @@ -1,6 +1,6 @@ { "enableCppIntellisense": false, "currentLanguage": "java", - "projectYear": "2024", + "projectYear": "2025", "teamNumber": 111 } \ No newline at end of file diff --git a/WPILib-License.md b/WPILib-License.md index 84349440..e7cd597b 100644 --- a/WPILib-License.md +++ b/WPILib-License.md @@ -1,4 +1,4 @@ -Copyright (c) 2009-2023 FIRST and other WPILib contributors +Copyright (c) 2009-2024 FIRST and other WPILib contributors All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/build.gradle b/build.gradle index 75d04022..e804c1c5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2024.3.2" + id "edu.wpi.first.GradleRIO" version "2025.1.1" } java { @@ -33,20 +33,14 @@ deploy { frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) { files = project.fileTree('src/main/deploy') directory = '/home/lvuser/deploy' + deleteOldFiles = false // Change to true to delete files on roboRIO that no + // longer exist in deploy directory of this project } } } } } -// build docs in /docs folder, don't build for sample -javadoc { - destinationDir = file("docs") - include 'org/wildstang/framework/**' - include 'org/wildstang/hardware/**' - include 'org/wildstang/sample/robot/**' -} - def deployArtifact = deploy.targets.roborio.artifacts.frcJava // Set to true to use debug for JNI. @@ -58,6 +52,7 @@ def includeDesktopSupport = false // Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries. // Also defines JUnit 5. dependencies { + annotationProcessor wpi.java.deps.wpilibAnnotations() implementation wpi.java.deps.wpilib() implementation wpi.java.vendor.java() diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd491..a4b76b95 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7015f6be..8e975a5f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=permwrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a42..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 6689b85b..9b42019c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/settings.gradle b/settings.gradle index 3e30f84f..7cab49b5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,7 +4,7 @@ pluginManagement { repositories { mavenLocal() gradlePluginPortal() - String frcYear = '2024' + String frcYear = '2025' File frcHome if (OperatingSystem.current().isWindows()) { String publicFolder = System.getenv('PUBLIC') diff --git a/src/main/java/org/wildstang/framework/auto/steps/SwervePathFollowerStep.java b/src/main/java/org/wildstang/framework/auto/steps/SwervePathFollowerStep.java index 05de4c3d..e02614f6 100644 --- a/src/main/java/org/wildstang/framework/auto/steps/SwervePathFollowerStep.java +++ b/src/main/java/org/wildstang/framework/auto/steps/SwervePathFollowerStep.java @@ -14,14 +14,16 @@ import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; -import com.choreo.lib.*; +import choreo.*; +import choreo.trajectory.Trajectory; + import com.google.gson.Gson; public class SwervePathFollowerStep extends AutoStep { private static final double mToIn = 39.3701; private SwerveDriveTemplate m_drive; - private ChoreoTrajectory pathtraj; + private Trajectory pathTraj; // x and y field relative private Pose2d fieldAutoPose, fieldRobotPose; diff --git a/src/main/java/org/wildstang/hardware/roborio/RoboRIOOutputFactory.java b/src/main/java/org/wildstang/hardware/roborio/RoboRIOOutputFactory.java index 70971c49..42c0f9f3 100644 --- a/src/main/java/org/wildstang/hardware/roborio/RoboRIOOutputFactory.java +++ b/src/main/java/org/wildstang/hardware/roborio/RoboRIOOutputFactory.java @@ -8,7 +8,7 @@ import org.wildstang.hardware.roborio.outputs.WsDigitalOutput; import org.wildstang.hardware.roborio.outputs.WsDoubleSolenoid; import org.wildstang.hardware.roborio.outputs.WsI2COutput; -import org.wildstang.hardware.roborio.outputs.WsPhoenix; +// import org.wildstang.hardware.roborio.outputs.WsPhoenix; import org.wildstang.hardware.roborio.outputs.WsRelay; import org.wildstang.hardware.roborio.outputs.WsServo; import org.wildstang.hardware.roborio.outputs.WsSolenoid; @@ -66,19 +66,19 @@ else if (config instanceof WsRelayConfig) { WsRelayConfig c = (WsRelayConfig) config; out = new WsRelay(p_output.getName(), c.getChannel()); } - else if (config instanceof WsPhoenixConfig) { - WsPhoenixConfig c = (WsPhoenixConfig) config; - out = new WsPhoenix(p_output.getName(), c.getChannel(), c.getDefault(), - c.getType(), c.isInverted()); - } + // else if (config instanceof WsPhoenixConfig) { + // WsPhoenixConfig c = (WsPhoenixConfig) config; + // out = new WsPhoenix(p_output.getName(), c.getChannel(), c.getDefault(), + // c.getType(), c.isInverted()); + // } // Note a WsPhoenixFollower must be defined after its corresponding WsPhoenix - else if (config instanceof WsPhoenixFollowerConfig) { - WsPhoenixFollowerConfig c = (WsPhoenixFollowerConfig) config; - // Returns the follwed WsPhoenix because a return is required - // and duplicate outputs are thrown out when encountered. - out = Core.getOutputManager().getOutput(c.getFollowing()); - ((WsPhoenix) out).addFollower(c.getChannel(), c.getType(), c.isOpposing()); - } + // else if (config instanceof WsPhoenixFollowerConfig) { + // WsPhoenixFollowerConfig c = (WsPhoenixFollowerConfig) config; + // // Returns the follwed WsPhoenix because a return is required + // // and duplicate outputs are thrown out when encountered. + // out = Core.getOutputManager().getOutput(c.getFollowing()); + // ((WsPhoenix) out).addFollower(c.getChannel(), c.getType(), c.isOpposing()); + // } else if (config instanceof WsSparkConfig) { WsSparkConfig c = (WsSparkConfig) config; out = new WsSpark(p_output.getName(), c.getChannel(), c.getType(), c.getDefault(), c.isInverted()); diff --git a/src/main/java/org/wildstang/hardware/roborio/outputs/WsPhoenix.java b/src/main/java/org/wildstang/hardware/roborio/outputs/WsPhoenix.java index 4f680a69..7fceab19 100644 --- a/src/main/java/org/wildstang/hardware/roborio/outputs/WsPhoenix.java +++ b/src/main/java/org/wildstang/hardware/roborio/outputs/WsPhoenix.java @@ -1,344 +1,344 @@ -package org.wildstang.hardware.roborio.outputs; - -import org.wildstang.framework.logger.Log; -import org.wildstang.hardware.roborio.outputs.config.WsMotorControllers; - -import java.util.ArrayList; - -import com.ctre.phoenix.motion.MotionProfileStatus; -import com.ctre.phoenix.motion.SetValueMotionProfile; -import com.ctre.phoenix.motion.TrajectoryPoint; -import com.ctre.phoenix.motorcontrol.ControlMode; -import com.ctre.phoenix.motorcontrol.InvertType; -import com.ctre.phoenix.motorcontrol.NeutralMode; -import com.ctre.phoenix.motorcontrol.StatorCurrentLimitConfiguration; -import com.ctre.phoenix.motorcontrol.can.BaseMotorController; -import com.ctre.phoenix.motorcontrol.can.BaseTalon; -import com.ctre.phoenix.motorcontrol.can.TalonFX; -import com.ctre.phoenix.motorcontrol.can.TalonSRX; -import com.ctre.phoenix.motorcontrol.can.VictorSPX; - -/** - * Controls a Talon or Victor motor controller as a Phoenix BaseMotorController. - * @author Liam - */ -public class WsPhoenix extends WsMotorController { - - BaseMotorController motor; - BaseMotorController follower; - - /** - * Constructs the motor controller from config. - * @param name Descriptive name of the controller. - * @param channel Motor controller CAN constant. - * @param p_default Default output value. - * @param controller Enumeration representing type of controller. - * @param invert Invert the motor's direction. - */ - public WsPhoenix(String name, int channel, double p_default, WsMotorControllers controller, boolean invert) { - super(name, p_default); - - switch (controller) { - case TALON_SRX: - motor = new TalonSRX(channel); - break; - case VICTOR_SPX: - motor = new VictorSPX(channel); - break; - case TALON_FX: - motor = new TalonFX(channel); - break; - default: - Log.error("Invalid motor controller for WsPhoenix!"); - return; - } - motor.setInverted(invert); - } - - /** - * Add a follower motor to the current motor. - * @param canConstant CAN constant of the new follower motor. - * @param controller Enumeration representing type of controller. - * @param oppose True if the follow should oppose the direction of this motor. - */ - public void addFollower(int canConstant, WsMotorControllers controller, boolean oppose) { - switch (controller) { - case TALON_SRX: - follower = new TalonSRX(canConstant); - break; - case VICTOR_SPX: - follower = new VictorSPX(canConstant); - break; - case TALON_FX: - follower = new TalonFX(canConstant); - break; - default: - Log.error("Invalid follower motor controller for WsPhoenix!"); - return; - } - follower.follow(motor); - follower.setInverted(oppose ? InvertType.OpposeMaster : InvertType.FollowMaster); - } - - /** - * Returns the raw motor controller Object. - * @return CANSparkMax Object. - */ - public BaseMotorController getController() { - return motor; - } - - /** - * Returns the raw follower motor controller Object. - * @return Follower motor controller object, null if no follower. - */ - public BaseMotorController getFollower() { - return follower; - } - - /** - * Determines the type of motor controller represented. - * @return Enumeration representing type of motor controller. - */ - public WsMotorControllers getControllerType() { - if (motor instanceof TalonSRX) { - return WsMotorControllers.TALON_SRX; - } - else if (motor instanceof TalonFX) { - return WsMotorControllers.TALON_FX; - } - else if (motor instanceof VictorSPX) { - return WsMotorControllers.VICTOR_SPX; - } - return WsMotorControllers.UNKNOWN; - } - - /** - * Brake Functions - */ - - /** - * Sets the motor to brake mode, will not freely spin. - */ - public void setBrake() { - motor.setNeutralMode(NeutralMode.Brake); - } - - /** - * Sets the motor to coast mode, will freely spin. - */ - public void setCoast() { - motor.setNeutralMode(NeutralMode.Coast); - } - - /** - * Current Limit Functions - */ - - /** - * Sets the current limit of the motor controller. - * Only Talons support current limiting. - * @param peakLimitAmps The instantaneous amount of amps drawn before limiting. - * @param peakDuractionMs The amount of time peakLimitAmps must be broken before limiting, in milliseconds. - * @param continuousLimitAmps The continuous amount of amps drawn before limiting, normally less than peakLimitAmps. - */ - public void setCurrentLimit(int peakLimitAmps, int peakDuractionMs, int continuousLimitAmps) { - if (motor instanceof TalonSRX) { - TalonSRX t = (TalonSRX) motor; - t.configPeakCurrentLimit(peakLimitAmps); - t.configPeakCurrentDuration(peakDuractionMs); - t.configContinuousCurrentLimit(continuousLimitAmps); - t.enableCurrentLimit(true); - } - else if (motor instanceof TalonFX) { - ((TalonFX) motor).configStatorCurrentLimit(new StatorCurrentLimitConfiguration(true, continuousLimitAmps, peakLimitAmps, peakDuractionMs)); - } - } - - /** - * Disables the current limit of the motor controller. - * Only Talons support current limiting. - */ - public void disableCurrentLimit() { - if (motor instanceof TalonSRX) { - ((TalonSRX) motor).enableCurrentLimit(false); - } - else if (motor instanceof TalonFX) { - StatorCurrentLimitConfiguration config = new StatorCurrentLimitConfiguration(); - ((TalonFX) motor).configGetStatorCurrentLimit(config); - config.enable = false; - } - } - - /** - * Encoder Functions - */ - - /** - * Returns the quadrature velocity from a Talon's encoder. - * @return Current velocity, 0 if not a Talon. - */ - public double getVelocity() { - if (motor instanceof TalonSRX) { - return ((TalonSRX) motor).getSensorCollection().getQuadratureVelocity(); - } - else if (motor instanceof TalonFX) { - return ((TalonFX) motor).getSensorCollection().getIntegratedSensorVelocity(); - } - return 0; - } - - /** - * Returns the quadrature position from a Talon's encoder. - * @return Current position, 0 if not a Talon. - */ - public double getPosition() { - if (motor instanceof TalonSRX) { - return ((TalonSRX) motor).getSensorCollection().getQuadraturePosition(); - } - else if (motor instanceof TalonFX) { - return ((TalonFX) motor).getSensorCollection().getIntegratedSensorPosition(); - } - return 0; - } +// package org.wildstang.hardware.roborio.outputs; + +// import org.wildstang.framework.logger.Log; +// import org.wildstang.hardware.roborio.outputs.config.WsMotorControllers; + +// import java.util.ArrayList; + +// import com.ctre.phoenix.motion.MotionProfileStatus; +// import com.ctre.phoenix.motion.SetValueMotionProfile; +// import com.ctre.phoenix.motion.TrajectoryPoint; +// import com.ctre.phoenix.motorcontrol.ControlMode; +// import com.ctre.phoenix.motorcontrol.InvertType; +// import com.ctre.phoenix.motorcontrol.NeutralMode; +// import com.ctre.phoenix.motorcontrol.StatorCurrentLimitConfiguration; +// import com.ctre.phoenix.motorcontrol.can.BaseMotorController; +// import com.ctre.phoenix.motorcontrol.can.BaseTalon; +// import com.ctre.phoenix.motorcontrol.can.TalonFX; +// import com.ctre.phoenix.motorcontrol.can.TalonSRX; +// import com.ctre.phoenix.motorcontrol.can.VictorSPX; + +// /** +// * Controls a Talon or Victor motor controller as a Phoenix BaseMotorController. +// * @author Liam +// */ +// public class WsPhoenix extends WsMotorController { + +// BaseMotorController motor; +// BaseMotorController follower; + +// /** +// * Constructs the motor controller from config. +// * @param name Descriptive name of the controller. +// * @param channel Motor controller CAN constant. +// * @param p_default Default output value. +// * @param controller Enumeration representing type of controller. +// * @param invert Invert the motor's direction. +// */ +// public WsPhoenix(String name, int channel, double p_default, WsMotorControllers controller, boolean invert) { +// super(name, p_default); + +// switch (controller) { +// case TALON_SRX: +// motor = new TalonSRX(channel); +// break; +// case VICTOR_SPX: +// motor = new VictorSPX(channel); +// break; +// case TALON_FX: +// motor = new TalonFX(channel); +// break; +// default: +// Log.error("Invalid motor controller for WsPhoenix!"); +// return; +// } +// motor.setInverted(invert); +// } + +// /** +// * Add a follower motor to the current motor. +// * @param canConstant CAN constant of the new follower motor. +// * @param controller Enumeration representing type of controller. +// * @param oppose True if the follow should oppose the direction of this motor. +// */ +// public void addFollower(int canConstant, WsMotorControllers controller, boolean oppose) { +// switch (controller) { +// case TALON_SRX: +// follower = new TalonSRX(canConstant); +// break; +// case VICTOR_SPX: +// follower = new VictorSPX(canConstant); +// break; +// case TALON_FX: +// follower = new TalonFX(canConstant); +// break; +// default: +// Log.error("Invalid follower motor controller for WsPhoenix!"); +// return; +// } +// follower.follow(motor); +// follower.setInverted(oppose ? InvertType.OpposeMaster : InvertType.FollowMaster); +// } + +// /** +// * Returns the raw motor controller Object. +// * @return CANSparkMax Object. +// */ +// public BaseMotorController getController() { +// return motor; +// } + +// /** +// * Returns the raw follower motor controller Object. +// * @return Follower motor controller object, null if no follower. +// */ +// public BaseMotorController getFollower() { +// return follower; +// } + +// /** +// * Determines the type of motor controller represented. +// * @return Enumeration representing type of motor controller. +// */ +// public WsMotorControllers getControllerType() { +// if (motor instanceof TalonSRX) { +// return WsMotorControllers.TALON_SRX; +// } +// else if (motor instanceof TalonFX) { +// return WsMotorControllers.TALON_FX; +// } +// else if (motor instanceof VictorSPX) { +// return WsMotorControllers.VICTOR_SPX; +// } +// return WsMotorControllers.UNKNOWN; +// } + +// /** +// * Brake Functions +// */ + +// /** +// * Sets the motor to brake mode, will not freely spin. +// */ +// public void setBrake() { +// motor.setNeutralMode(NeutralMode.Brake); +// } + +// /** +// * Sets the motor to coast mode, will freely spin. +// */ +// public void setCoast() { +// motor.setNeutralMode(NeutralMode.Coast); +// } + +// /** +// * Current Limit Functions +// */ + +// /** +// * Sets the current limit of the motor controller. +// * Only Talons support current limiting. +// * @param peakLimitAmps The instantaneous amount of amps drawn before limiting. +// * @param peakDuractionMs The amount of time peakLimitAmps must be broken before limiting, in milliseconds. +// * @param continuousLimitAmps The continuous amount of amps drawn before limiting, normally less than peakLimitAmps. +// */ +// public void setCurrentLimit(int peakLimitAmps, int peakDuractionMs, int continuousLimitAmps) { +// if (motor instanceof TalonSRX) { +// TalonSRX t = (TalonSRX) motor; +// t.configPeakCurrentLimit(peakLimitAmps); +// t.configPeakCurrentDuration(peakDuractionMs); +// t.configContinuousCurrentLimit(continuousLimitAmps); +// t.enableCurrentLimit(true); +// } +// else if (motor instanceof TalonFX) { +// ((TalonFX) motor).configStatorCurrentLimit(new StatorCurrentLimitConfiguration(true, continuousLimitAmps, peakLimitAmps, peakDuractionMs)); +// } +// } + +// /** +// * Disables the current limit of the motor controller. +// * Only Talons support current limiting. +// */ +// public void disableCurrentLimit() { +// if (motor instanceof TalonSRX) { +// ((TalonSRX) motor).enableCurrentLimit(false); +// } +// else if (motor instanceof TalonFX) { +// StatorCurrentLimitConfiguration config = new StatorCurrentLimitConfiguration(); +// ((TalonFX) motor).configGetStatorCurrentLimit(config); +// config.enable = false; +// } +// } + +// /** +// * Encoder Functions +// */ + +// /** +// * Returns the quadrature velocity from a Talon's encoder. +// * @return Current velocity, 0 if not a Talon. +// */ +// public double getVelocity() { +// if (motor instanceof TalonSRX) { +// return ((TalonSRX) motor).getSensorCollection().getQuadratureVelocity(); +// } +// else if (motor instanceof TalonFX) { +// return ((TalonFX) motor).getSensorCollection().getIntegratedSensorVelocity(); +// } +// return 0; +// } + +// /** +// * Returns the quadrature position from a Talon's encoder. +// * @return Current position, 0 if not a Talon. +// */ +// public double getPosition() { +// if (motor instanceof TalonSRX) { +// return ((TalonSRX) motor).getSensorCollection().getQuadraturePosition(); +// } +// else if (motor instanceof TalonFX) { +// return ((TalonFX) motor).getSensorCollection().getIntegratedSensorPosition(); +// } +// return 0; +// } - /** - * Resets the position of a Talon's encoder. - */ - public void resetEncoder() { - if (motor instanceof TalonSRX) { - ((TalonSRX) motor).setSelectedSensorPosition(0, 0, -1); - } - else if (motor instanceof TalonFX) { - ((TalonFX) motor).getSensorCollection().setIntegratedSensorPosition(0, -1); - } - } - - /** - * Returns the state of a Talon's limit switches. - * @return Returns 1 if the forward limit switch is closed, 0 if neither or both, - * and -1 if the reverse limit switch is closed. - */ - public int limitSwitchState() { - int state = 0; - if (motor instanceof BaseTalon) { - BaseTalon t = (BaseTalon) motor; - // BaseTalon functions return 0 if open 1 if closed - state = t.isFwdLimitSwitchClosed() - t.isRevLimitSwitchClosed(); - } - return state; - } - - /** - * Motion Profile Functions - */ +// /** +// * Resets the position of a Talon's encoder. +// */ +// public void resetEncoder() { +// if (motor instanceof TalonSRX) { +// ((TalonSRX) motor).setSelectedSensorPosition(0, 0, -1); +// } +// else if (motor instanceof TalonFX) { +// ((TalonFX) motor).getSensorCollection().setIntegratedSensorPosition(0, -1); +// } +// } + +// /** +// * Returns the state of a Talon's limit switches. +// * @return Returns 1 if the forward limit switch is closed, 0 if neither or both, +// * and -1 if the reverse limit switch is closed. +// */ +// public int limitSwitchState() { +// int state = 0; +// if (motor instanceof BaseTalon) { +// BaseTalon t = (BaseTalon) motor; +// // BaseTalon functions return 0 if open 1 if closed +// state = t.isFwdLimitSwitchClosed() - t.isRevLimitSwitchClosed(); +// } +// return state; +// } + +// /** +// * Motion Profile Functions +// */ - /** - * Sets and runs the motion profile slot to use. - * @param slot Motion profile slot number. - */ - public void setProfile(int slot) { - motor.set(ControlMode.MotionProfile, SetValueMotionProfile.Disable.value); - motor.selectProfileSlot(slot, 0); - } +// /** +// * Sets and runs the motion profile slot to use. +// * @param slot Motion profile slot number. +// */ +// public void setProfile(int slot) { +// motor.set(ControlMode.MotionProfile, SetValueMotionProfile.Disable.value); +// motor.selectProfileSlot(slot, 0); +// } - /** - * Enables or disables motion profile. - * @param enable True if to enable profile. - */ - public void enableProfile(boolean enable) { - if (!enable) { - motor.clearMotionProfileTrajectories(); - } - motor.set(ControlMode.MotionProfile, - (enable ? SetValueMotionProfile.Enable : SetValueMotionProfile.Disable).value); - } +// /** +// * Enables or disables motion profile. +// * @param enable True if to enable profile. +// */ +// public void enableProfile(boolean enable) { +// if (!enable) { +// motor.clearMotionProfileTrajectories(); +// } +// motor.set(ControlMode.MotionProfile, +// (enable ? SetValueMotionProfile.Enable : SetValueMotionProfile.Disable).value); +// } - /** - * Get the motor controller's motion profile status. - * @return Status of the motion profile. - */ - public MotionProfileStatus getProfileStatus() { - MotionProfileStatus status = new MotionProfileStatus(); - motor.getMotionProfileStatus(status); - return status; - } - - /** - * Fills the motor controllers path buffers with the upcoming points. - * @param points List of upcoming trajectories. - */ - public void fillProfile(ArrayList points) { - if (getProfileStatus().hasUnderrun) { - motor.clearMotionProfileHasUnderrun(); - } - - /* - * just in case we are interrupting another MP and there is still buffer points - * in memory, clear it. - */ - motor.clearMotionProfileTrajectories(); - - /* This is fast since it's just into our TOP buffer */ - for (int i = 0; i < points.size(); ++i) { - motor.pushMotionProfileTrajectory(points.get(i)); - } - } - - /** - * Processes the current motion profile's buffer. - */ - public void updateProfile() { - motor.processMotionProfileBuffer(); - } - - /** - * Sets the motion profiles control frame period. - * @param period Time in milliseconds. - */ - public void setMotionControlFramePeriod(int period) { - motor.changeMotionControlFramePeriod(20); - } - - /** - * Actively holds a given position, useful for braking. - * @param slot Motion profile slot number. - */ - public void holdPosition(int slot) { - motor.selectProfileSlot(slot, 0); - motor.set(ControlMode.Position, motor.getSelectedSensorPosition()); - } - - /** - * Output Functions - */ - - /** - * Returns the current motor output percent. - * @return Current motor output as a percent. - */ - public double getOutput() { - return motor.getMotorOutputPercent(); - } - - /** - * Return the motor controller temperature - */ - @Override - public double getTemperature() { - return motor.getTemperature(); - } - - /** - * Sets motor speed to current value, from -1.0 to 1.0. - */ - @Override - public void sendDataToOutput() { - motor.set(ControlMode.PercentOutput, getValue()); - } - - /** - * Does nothing, config values only affects start state. - */ - public void notifyConfigChange() {} -} +// /** +// * Get the motor controller's motion profile status. +// * @return Status of the motion profile. +// */ +// public MotionProfileStatus getProfileStatus() { +// MotionProfileStatus status = new MotionProfileStatus(); +// motor.getMotionProfileStatus(status); +// return status; +// } + +// /** +// * Fills the motor controllers path buffers with the upcoming points. +// * @param points List of upcoming trajectories. +// */ +// public void fillProfile(ArrayList points) { +// if (getProfileStatus().hasUnderrun) { +// motor.clearMotionProfileHasUnderrun(); +// } + +// /* +// * just in case we are interrupting another MP and there is still buffer points +// * in memory, clear it. +// */ +// motor.clearMotionProfileTrajectories(); + +// /* This is fast since it's just into our TOP buffer */ +// for (int i = 0; i < points.size(); ++i) { +// motor.pushMotionProfileTrajectory(points.get(i)); +// } +// } + +// /** +// * Processes the current motion profile's buffer. +// */ +// public void updateProfile() { +// motor.processMotionProfileBuffer(); +// } + +// /** +// * Sets the motion profiles control frame period. +// * @param period Time in milliseconds. +// */ +// public void setMotionControlFramePeriod(int period) { +// motor.changeMotionControlFramePeriod(20); +// } + +// /** +// * Actively holds a given position, useful for braking. +// * @param slot Motion profile slot number. +// */ +// public void holdPosition(int slot) { +// motor.selectProfileSlot(slot, 0); +// motor.set(ControlMode.Position, motor.getSelectedSensorPosition()); +// } + +// /** +// * Output Functions +// */ + +// /** +// * Returns the current motor output percent. +// * @return Current motor output as a percent. +// */ +// public double getOutput() { +// return motor.getMotorOutputPercent(); +// } + +// /** +// * Return the motor controller temperature +// */ +// @Override +// public double getTemperature() { +// return motor.getTemperature(); +// } + +// /** +// * Sets motor speed to current value, from -1.0 to 1.0. +// */ +// @Override +// public void sendDataToOutput() { +// motor.set(ControlMode.PercentOutput, getValue()); +// } + +// /** +// * Does nothing, config values only affects start state. +// */ +// public void notifyConfigChange() {} +// } diff --git a/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java b/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java index f27af0b5..0764218e 100644 --- a/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java +++ b/src/main/java/org/wildstang/hardware/roborio/outputs/WsSpark.java @@ -1,13 +1,21 @@ package org.wildstang.hardware.roborio.outputs; -import com.revrobotics.SparkPIDController; -import com.revrobotics.AbsoluteEncoder; -import com.revrobotics.CANSparkBase; -import com.revrobotics.CANSparkMax; -import com.revrobotics.CANSparkFlex; -import com.revrobotics.CANSparkBase.IdleMode; -import com.revrobotics.CANSparkLowLevel.MotorType; -import com.revrobotics.CANSparkBase.ControlType; +import com.revrobotics.spark.ClosedLoopSlot; +import com.revrobotics.spark.SparkBase; +import com.revrobotics.spark.SparkClosedLoopController; +import com.revrobotics.spark.SparkAbsoluteEncoder; +import com.revrobotics.spark.SparkBase.ControlType; +import com.revrobotics.spark.SparkBase.PersistMode; +import com.revrobotics.spark.SparkBase.ResetMode; +import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.SparkBaseConfig; +import com.revrobotics.spark.config.SparkFlexConfig; +import com.revrobotics.spark.config.SparkMaxConfig; +import com.revrobotics.spark.config.AbsoluteEncoderConfig; +import com.revrobotics.spark.config.ClosedLoopConfig.FeedbackSensor; +import com.revrobotics.spark.config.SparkBaseConfig.IdleMode; +import com.revrobotics.spark.SparkFlex; +import com.revrobotics.spark.SparkLowLevel.MotorType; import org.wildstang.framework.logger.Log; import org.wildstang.hardware.roborio.outputs.config.WsMotorControllers; @@ -18,13 +26,14 @@ */ public class WsSpark extends WsMotorController { - CANSparkBase motor; - CANSparkBase follower; - SparkPIDController controller; + SparkBase motor; + SparkBase follower; + SparkBaseConfig config; + SparkBaseConfig followerConfig; + AbsoluteEncoderConfig absEncoderConfig; boolean isUsingController; boolean isChanged; - ControlType controlType; - int slotID; + com.revrobotics.spark.SparkBase.ControlType controlType; /** * Constructs the motor controller from config. @@ -52,17 +61,19 @@ public WsSpark(String name, int channel, WsMotorControllers controller, double p switch (controller) { case SPARK_MAX_BRUSHED: case SPARK_MAX_BRUSHLESS: - motor = new CANSparkMax(channel, brushless ? MotorType.kBrushless : MotorType.kBrushed); + motor = new SparkMax(channel, brushless ? MotorType.kBrushless : MotorType.kBrushed); + config = new SparkMaxConfig(); break; case SPARK_FLEX_BRUSHED: case SPARK_FLEX_BRUSHLESS: - motor = new CANSparkFlex(channel, brushless ? MotorType.kBrushless : MotorType.kBrushed); + motor = new SparkFlex(channel, brushless ? MotorType.kBrushless : MotorType.kBrushed); + config = new SparkFlexConfig(); break; default: Log.error("Invalid motor controller for WsSpark!"); return; } - motor.setInverted(invert); + config.inverted(invert); isUsingController = false; isChanged = true; controlType = ControlType.kDutyCycle; @@ -79,24 +90,26 @@ public void addFollower(int canConstant, WsMotorControllers controller, boolean switch (controller) { case SPARK_MAX_BRUSHED: case SPARK_MAX_BRUSHLESS: - follower = new CANSparkMax(canConstant, brushless ? MotorType.kBrushless : MotorType.kBrushed); + follower = new SparkMax(canConstant, brushless ? MotorType.kBrushless : MotorType.kBrushed); + followerConfig = new SparkMaxConfig(); break; case SPARK_FLEX_BRUSHED: case SPARK_FLEX_BRUSHLESS: - follower = new CANSparkFlex(canConstant, brushless ? MotorType.kBrushless : MotorType.kBrushed); + follower = new SparkFlex(canConstant, brushless ? MotorType.kBrushless : MotorType.kBrushed); + followerConfig = new SparkFlexConfig(); break; default: Log.error("Invalid follower motor controller for WsSpark!"); return; } - follower.follow(motor, oppose); + followerConfig.follow(motor, oppose); } /** * Returns the raw motor controller Object. - * @return CANSparkBase Object. + * @return SparkBase Object. */ - public CANSparkBase getController() { + public SparkBase getController() { return motor; } @@ -104,7 +117,7 @@ public CANSparkBase getController() { * Returns the raw follower motor controller Object. * @return Follower motor controller object, null if no follower. */ - public CANSparkBase getFollower() { + public SparkBase getFollower() { return follower; } @@ -112,10 +125,10 @@ public CANSparkBase getFollower() { * Sets the motor to brake mode, will not freely spin. */ public void setBrake() { - motor.setIdleMode(IdleMode.kBrake); + config.idleMode(IdleMode.kBrake); if (follower != null) { - follower.setIdleMode(IdleMode.kBrake); + followerConfig.idleMode(IdleMode.kBrake); } } @@ -123,10 +136,10 @@ public void setBrake() { * Sets the motor to coast mode, will freely spin. */ public void setCoast() { - motor.setIdleMode(IdleMode.kCoast); + config.idleMode(IdleMode.kCoast); if (follower != null) { - follower.setIdleMode(IdleMode.kCoast); + followerConfig.idleMode(IdleMode.kCoast); } } @@ -137,9 +150,22 @@ public void setCoast() { * @param limitRPM Sets the line between stallLimitAmps and freeLimitAmps. */ public void setCurrentLimit(int stallLimitAmps, int freeLimitAmps, int limitRPM) { - motor.setSmartCurrentLimit(stallLimitAmps, freeLimitAmps, limitRPM); + config.smartCurrentLimit(stallLimitAmps, freeLimitAmps, limitRPM); + if (follower != null){ + followerConfig.smartCurrentLimit(stallLimitAmps, freeLimitAmps, limitRPM); + } enableVoltageCompensation(); - motor.burnFlash(); + configure(); + } + + /* + * Burn to flash the current config files + */ + public void configure(){ + motor.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters); + if (follower != null){ + follower.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters); + } } /** @@ -147,14 +173,20 @@ public void setCurrentLimit(int stallLimitAmps, int freeLimitAmps, int limitRPM) * @param limit the amount of amps drawn before limiting */ public void tempCurrentLimit(int limit){ - motor.setSmartCurrentLimit(limit, limit, 0); + config.smartCurrentLimit(limit,limit,0); + if (follower != null){ + followerConfig.smartCurrentLimit(limit, limit, 0); + } } /** * Enables voltage compensation. */ public void enableVoltageCompensation(){ - motor.enableVoltageCompensation(12); + config.voltageCompensation(12); + if (follower != null){ + followerConfig.voltageCompensation(12); + } } /** @@ -206,11 +238,11 @@ public void sendDataToOutput() { motor.set(getValue()); } else { if (controlType == ControlType.kPosition){ - controller.setReference(super.getValue(), controlType, slotID); + motor.getClosedLoopController().setReference(super.getValue(), ControlType.kPosition); } else if (controlType == ControlType.kVelocity){ - controller.setReference(super.getValue(), controlType); + motor.getClosedLoopController().setReference(super.getValue(), ControlType.kVelocity); } else if (controlType == ControlType.kDutyCycle){ - controller.setReference(super.getValue(), controlType); + motor.getClosedLoopController().setReference(super.getValue(), ControlType.kDutyCycle); } } } @@ -239,13 +271,9 @@ public void setSpeed(double value){ * @param FF the feed forward constant */ public void initClosedLoop(double P, double I, double D, double FF){ - controller = motor.getPIDController(); - controller.setP(P, 0); - controller.setI(I, 0); - controller.setD(D, 0); - controller.setFF(FF, 0); + config.closedLoop.pidf(P, I, D, FF); + config.closedLoop.feedbackSensor(FeedbackSensor.kPrimaryEncoder); isUsingController = true; - slotID = 0; } /** @@ -256,18 +284,16 @@ public void initClosedLoop(double P, double I, double D, double FF){ * @param FF the feed forward constant * @param absEncoder absolute encoder used to provided PID feedback */ - public void initClosedLoop(double P, double I, double D, double FF, AbsoluteEncoder absEncoder){ - controller = motor.getPIDController(); - controller.setP(P, 0); - controller.setI(I, 0); - controller.setD(D, 0); - controller.setFF(FF, 0); - controller.setFeedbackDevice(absEncoder); - controller.setPositionPIDWrappingEnabled(true); - controller.setPositionPIDWrappingMinInput(0.0); - controller.setPositionPIDWrappingMaxInput(360.0); + public void initClosedLoop(double P, double I, double D, double FF, SparkAbsoluteEncoder absEncoder, boolean isEncoderFlipped){ + config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot0); + absEncoderConfig.positionConversionFactor(360.0); + absEncoderConfig.velocityConversionFactor(360.0/60.0); + absEncoderConfig.inverted(isEncoderFlipped); + config.closedLoop.feedbackSensor(FeedbackSensor.kAbsoluteEncoder); + config.closedLoop.positionWrappingEnabled(true); + config.closedLoop.positionWrappingMaxInput(360.0); + config.closedLoop.positionWrappingMinInput(0.0); isUsingController = true; - slotID = 0; } /** * Sets up closed loop control for the motor @@ -278,22 +304,17 @@ public void initClosedLoop(double P, double I, double D, double FF, AbsoluteEnco * @param absEncoder absolute encoder used to provided PID feedback * @param isWrapped whether wrapping should be enabled */ - public void initClosedLoop(double P, double I, double D, double FF, AbsoluteEncoder absEncoder, boolean isWrapped){ - controller = motor.getPIDController(); - controller.setP(P, 0); - controller.setI(I, 0); - controller.setD(D, 0); - controller.setFF(FF, 0); - controller.setFeedbackDevice(absEncoder); - controller.setPositionPIDWrappingEnabled(isWrapped); - controller.setPositionPIDWrappingMinInput(0.0); - controller.setPositionPIDWrappingMaxInput(360.0); + public void initClosedLoop(double P, double I, double D, double FF, SparkAbsoluteEncoder absEncoder, boolean isEncoderFlipped, boolean isWrapped){ + config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot0); + absEncoderConfig.positionConversionFactor(360.0); + absEncoderConfig.velocityConversionFactor(360.0/60.0); + absEncoderConfig.inverted(isEncoderFlipped); + config.closedLoop.feedbackSensor(FeedbackSensor.kAbsoluteEncoder); + config.closedLoop.positionWrappingEnabled(isWrapped); + config.closedLoop.positionWrappingMaxInput(360.0); + config.closedLoop.positionWrappingMinInput(0.0); + isUsingController = true; isUsingController = true; - slotID = 0; - } - - public SparkPIDController getPIDController(){ - return motor.getPIDController(); } /* @@ -302,11 +323,10 @@ public SparkPIDController getPIDController(){ * @param PIDFF the constants values */ public void addClosedLoop(int slotID, double P, double I, double D, double FF){ - controller.setP(P, slotID); - controller.setI(I, slotID); - controller.setD(D, slotID); - controller.setFF(FF, slotID); - + if (slotID == 0) config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot0); + else if (slotID == 1) config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot1); + else if (slotID == 2) config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot2); + else config.closedLoop.pidf(P, I, D, FF, ClosedLoopSlot.kSlot3); } /** @@ -321,7 +341,6 @@ public void setPosition(double target){ } super.setValue(target); controlType = ControlType.kPosition; - slotID = 0; } /** @@ -337,7 +356,6 @@ public void setPosition(double target, int slotID){ } super.setValue(target); controlType = ControlType.kPosition; - this.slotID = slotID; } /** diff --git a/src/main/java/org/wildstang/sample/auto/Programs/TestProgram.java b/src/main/java/org/wildstang/sample/auto/Programs/TestProgram.java index 9cb3ba59..0824c735 100644 --- a/src/main/java/org/wildstang/sample/auto/Programs/TestProgram.java +++ b/src/main/java/org/wildstang/sample/auto/Programs/TestProgram.java @@ -12,7 +12,6 @@ import org.wildstang.sample.robot.WsSubsystems; import org.wildstang.sample.subsystems.swerve.SwerveDrive; -import com.choreo.lib.*; import edu.wpi.first.wpilibj.DriverStation.Alliance; diff --git a/src/main/java/org/wildstang/sample/robot/KalmanFilterJenny.java b/src/main/java/org/wildstang/sample/robot/KalmanFilterJenny.java index 54f637dc..c4b9e14d 100644 --- a/src/main/java/org/wildstang/sample/robot/KalmanFilterJenny.java +++ b/src/main/java/org/wildstang/sample/robot/KalmanFilterJenny.java @@ -58,7 +58,7 @@ public class KalmanFilterJenny { private SwerveDrive swerve = (SwerveDrive) Core.getSubsystemManager().getSubsystem("SwerveDrive"); private SwerveDriveOdometry odometry; - private com.ctre.phoenix.sensors.Pigeon2 gyro; + public final Pigeon2 gyro; private ChassisSpeeds robotSpeeds; private final int ACCL_X = 0; @@ -81,7 +81,7 @@ private void initStateMatrix(){ //getting x,y acceleration values from gyro short[] shortAcceleration = {0,0,0}; - gyro.getBiasedAccelerometer(shortAcceleration); + //gyro.getBiasedAccelerometer(shortAcceleration); double[] acceleration = new double[2]; for (int i=0;i<2;i++) { acceleration[i] = shortAcceleration[i]; @@ -109,7 +109,7 @@ public void initCovarianceMatrix(){ private void updateMeasurementMatrix(){ short[] shortAcceleration = {0,0,0}; - gyro.getBiasedAccelerometer(shortAcceleration); + //gyro.getBiasedAccelerometer(shortAcceleration); double[] acceleration = new double[2]; for (int i=0;i<2;i++) { acceleration[i] = shortAcceleration[i]; @@ -119,7 +119,7 @@ private void updateMeasurementMatrix(){ z.set(1, 0, odometry.getPoseMeters().getY()); // y measurement z.set(2, 0, acceleration[ACCL_X]); // ax measurement z.set(3, 0, acceleration[ACCL_Y]); // ay measurement - z.set(4, 0, gyro.getYaw()); // theta measurement + z.set(4, 0, gyro.getYaw().getValueAsDouble()); // theta measurement } diff --git a/src/main/java/org/wildstang/sample/subsystems/drive/Drive.java b/src/main/java/org/wildstang/sample/subsystems/drive/Drive.java index 1f3aef0d..bfbe33b0 100644 --- a/src/main/java/org/wildstang/sample/subsystems/drive/Drive.java +++ b/src/main/java/org/wildstang/sample/subsystems/drive/Drive.java @@ -1,6 +1,6 @@ package org.wildstang.sample.subsystems.drive; -import com.kauailabs.navx.frc.AHRS; +import com.ctre.phoenix6.hardware.Pigeon2; import org.wildstang.framework.core.Core; import org.wildstang.framework.io.inputs.Input; @@ -9,6 +9,7 @@ import org.wildstang.hardware.roborio.inputs.WsAnalogInput; import org.wildstang.hardware.roborio.inputs.WsDigitalInput; import org.wildstang.hardware.roborio.outputs.WsSpark; +import org.wildstang.sample.robot.CANConstants; import org.wildstang.sample.robot.WsInputs; import org.wildstang.sample.robot.WsOutputs; @@ -28,7 +29,7 @@ public enum DriveState{ TELEOP, AUTO, BASELOCK;} private DriveSignal signal; private WsDriveHelper helper = new WsDriveHelper(); - private final AHRS gyro = new AHRS(I2C.Port.kOnboard); + public final Pigeon2 gyro = new Pigeon2(CANConstants.GYRO); @Override public void init() { @@ -144,7 +145,7 @@ private void motorSetUp(WsSpark setupMotor){ public void setGyro(double degrees){ gyro.reset(); - gyro.setAngleAdjustment(degrees); + gyro.setYaw((360-degrees)%360); } @Override diff --git a/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveDrive.java b/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveDrive.java index 4e90d09a..6addfa4e 100644 --- a/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveDrive.java +++ b/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveDrive.java @@ -1,6 +1,6 @@ package org.wildstang.sample.subsystems.swerve; -import com.ctre.phoenix.sensors.Pigeon2; +import com.ctre.phoenix6.hardware.Pigeon2; import java.util.Arrays; @@ -324,11 +324,11 @@ public void update() { SmartDashboard.putNumber("Rotation target", rotTarget); SmartDashboard.putNumber("Odo X", odometry.getPoseMeters().getX()); SmartDashboard.putNumber("Odo Y", odometry.getPoseMeters().getY()); - SmartDashboard.putNumber("Yaw", gyro.getYaw()); - SmartDashboard.putNumber("Roll", gyro.getRoll()); - SmartDashboard.putNumber("Pitch", gyro.getPitch()); + SmartDashboard.putNumber("Yaw", gyro.getYaw().getValueAsDouble()); + SmartDashboard.putNumber("Roll", gyro.getRoll().getValueAsDouble()); + SmartDashboard.putNumber("Pitch", gyro.getPitch().getValueAsDouble()); short[] shortAcceleration = {0,0,0}; - gyro.getBiasedAccelerometer(shortAcceleration); + //gyro.getBiasedAccelerometer(shortAcceleration); I'm not sure what replaces this double[] acceleration = new double[3]; for (int i=0;i<3;i++) { acceleration[i] = shortAcceleration[i]; @@ -425,7 +425,7 @@ public void setGyro(double degrees) { } public double getGyroAngle() { - return (360 - gyro.getYaw()+360)%360; + return (360 - gyro.getYaw().getValueAsDouble()+360)%360; } public double getFieldYaw(){ diff --git a/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveModule.java b/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveModule.java index aa5657d8..526b6c11 100644 --- a/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveModule.java +++ b/src/main/java/org/wildstang/sample/subsystems/swerve/SwerveModule.java @@ -1,7 +1,6 @@ package org.wildstang.sample.subsystems.swerve; -import com.revrobotics.AbsoluteEncoder; -import com.revrobotics.SparkAbsoluteEncoder.Type; +import com.revrobotics.spark.SparkAbsoluteEncoder; import org.wildstang.hardware.roborio.outputs.WsSpark; @@ -21,7 +20,7 @@ public class SwerveModule { private WsSpark driveMotor; private WsSpark angleMotor; - private AbsoluteEncoder absEncoder; + private SparkAbsoluteEncoder absEncoder; /** Class: SwerveModule * controls a single swerve pod, featuring two motors and one offboard sensor @@ -34,10 +33,8 @@ public SwerveModule(WsSpark driveMotor, WsSpark angleMotor, double offset) { this.driveMotor = driveMotor; // this.driveMotor.getController().getAbsoluteEncoder(Type.kDutyCycle).setVelocityConversionFactor(); this.angleMotor = angleMotor; - this.absEncoder = angleMotor.getController().getAbsoluteEncoder(Type.kDutyCycle); - this.absEncoder.setInverted(true); - this.absEncoder.setPositionConversionFactor(360.0); - this.absEncoder.setVelocityConversionFactor(360.0/60.0); + + this.absEncoder = angleMotor.getController().getAbsoluteEncoder(); this.driveMotor.setBrake(); this.angleMotor.setBrake(); @@ -45,7 +42,7 @@ public SwerveModule(WsSpark driveMotor, WsSpark angleMotor, double offset) { //set up angle and drive with pid and kpid respectively driveMotor.initClosedLoop(DriveConstants.DRIVE_P, DriveConstants.DRIVE_I, DriveConstants.DRIVE_D, 0); - angleMotor.initClosedLoop(DriveConstants.ANGLE_P, DriveConstants.ANGLE_I, DriveConstants.ANGLE_D, 0, this.absEncoder); + angleMotor.initClosedLoop(DriveConstants.ANGLE_P, DriveConstants.ANGLE_I, DriveConstants.ANGLE_D, 0, this.absEncoder, true); driveMotor.setCurrentLimit(DriveConstants.DRIVE_CURRENT_LIMIT, DriveConstants.DRIVE_CURRENT_LIMIT, 0); angleMotor.setCurrentLimit(DriveConstants.ANGLE_CURRENT_LIMIT, DriveConstants.ANGLE_CURRENT_LIMIT, 0); diff --git a/vendordeps/AdvantageKit.json b/vendordeps/AdvantageKit.json new file mode 100644 index 00000000..1fa7c033 --- /dev/null +++ b/vendordeps/AdvantageKit.json @@ -0,0 +1,34 @@ +{ + "fileName": "AdvantageKit.json", + "name": "AdvantageKit", + "version": "4.0.0", + "uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", + "frcYear": "2025", + "mavenUrls": [ + "https://frcmaven.wpi.edu/artifactory/littletonrobotics-mvn-release/" + ], + "jsonUrl": "https://github.com/Mechanical-Advantage/AdvantageKit/releases/latest/download/AdvantageKit.json", + "javaDependencies": [ + { + "groupId": "org.littletonrobotics.akit", + "artifactId": "akit-java", + "version": "4.0.0" + } + ], + "jniDependencies": [ + { + "groupId": "org.littletonrobotics.akit", + "artifactId": "akit-wpilibio", + "version": "4.0.0", + "skipInvalidPlatforms": false, + "isJar": false, + "validPlatforms": [ + "linuxathena", + "windowsx86-64", + "linuxx86-64", + "osxuniversal" + ] + } + ], + "cppDependencies": [] +} \ No newline at end of file diff --git a/vendordeps/ChoreoLib-2025.0.0.json b/vendordeps/ChoreoLib-2025.0.0.json new file mode 100644 index 00000000..e96f4f9a --- /dev/null +++ b/vendordeps/ChoreoLib-2025.0.0.json @@ -0,0 +1,44 @@ +{ + "fileName": "ChoreoLib-2025.0.0.json", + "name": "ChoreoLib", + "version": "2025.0.0", + "uuid": "b5e23f0a-dac9-4ad2-8dd6-02767c520aca", + "frcYear": "2025", + "mavenUrls": [ + "https://lib.choreo.autos/dep", + "https://repo1.maven.org/maven2" + ], + "jsonUrl": "https://lib.choreo.autos/dep/ChoreoLib2025.json", + "javaDependencies": [ + { + "groupId": "choreo", + "artifactId": "ChoreoLib-java", + "version": "2025.0.0" + }, + { + "groupId": "com.google.code.gson", + "artifactId": "gson", + "version": "2.11.0" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "choreo", + "artifactId": "ChoreoLib-cpp", + "version": "2025.0.0", + "libName": "ChoreoLib", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxuniversal", + "linuxathena", + "linuxarm32", + "linuxarm64" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/Phoenix5-5.35.1.json b/vendordeps/Phoenix5-5.35.1.json new file mode 100644 index 00000000..69df8b53 --- /dev/null +++ b/vendordeps/Phoenix5-5.35.1.json @@ -0,0 +1,171 @@ +{ + "fileName": "Phoenix5-5.35.1.json", + "name": "CTRE-Phoenix (v5)", + "version": "5.35.1", + "frcYear": "2025", + "uuid": "ab676553-b602-441f-a38d-f1296eff6537", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2025-latest.json", + "requires": [ + { + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.", + "offlineFileName": "Phoenix6-frc2025-latest.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json" + } + ], + "conflictsWith": [ + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Users must use the Phoenix 5 replay vendordep when using the Phoenix 6 replay vendordep.", + "offlineFileName": "Phoenix6-replay-frc2025-latest.json" + }, + { + "uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df", + "errorMessage": "Users cannot have both the replay and regular Phoenix 5 vendordeps in their robot program.", + "offlineFileName": "Phoenix5-replay-frc2025-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-java", + "version": "5.35.1" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-java", + "version": "5.35.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.35.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.35.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-cpp", + "version": "5.35.1", + "libName": "CTRE_Phoenix_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-cpp", + "version": "5.35.1", + "libName": "CTRE_Phoenix", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.35.1", + "libName": "CTRE_PhoenixCCI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "5.35.1", + "libName": "CTRE_Phoenix_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "api-cpp-sim", + "version": "5.35.1", + "libName": "CTRE_PhoenixSim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.35.1", + "libName": "CTRE_PhoenixCCISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/Phoenix6-25.1.0.json b/vendordeps/Phoenix6-25.1.0.json new file mode 100644 index 00000000..473f6a89 --- /dev/null +++ b/vendordeps/Phoenix6-25.1.0.json @@ -0,0 +1,389 @@ +{ + "fileName": "Phoenix6-25.1.0.json", + "name": "CTRE-Phoenix (v6)", + "version": "25.1.0", + "frcYear": "2025", + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json", + "conflictsWith": [ + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.", + "offlineFileName": "Phoenix6-replay-frc2025-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-java", + "version": "25.1.0" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "api-cpp", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "api-cpp-sim", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simCANCoder", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "25.1.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-cpp", + "version": "25.1.0", + "libName": "CTRE_Phoenix6_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "25.1.0", + "libName": "CTRE_PhoenixTools", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "25.1.0", + "libName": "CTRE_Phoenix6_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "25.1.0", + "libName": "CTRE_PhoenixTools_Sim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "25.1.0", + "libName": "CTRE_SimTalonSRX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "25.1.0", + "libName": "CTRE_SimVictorSPX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "25.1.0", + "libName": "CTRE_SimPigeonIMU", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simCANCoder", + "version": "25.1.0", + "libName": "CTRE_SimCANCoder", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "25.1.0", + "libName": "CTRE_SimProTalonFX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "25.1.0", + "libName": "CTRE_SimProCANcoder", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "25.1.0", + "libName": "CTRE_SimProPigeon2", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "25.1.0", + "libName": "CTRE_SimProCANrange", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/REVLib-2025.0.0.json b/vendordeps/REVLib-2025.0.0.json new file mode 100644 index 00000000..cde60117 --- /dev/null +++ b/vendordeps/REVLib-2025.0.0.json @@ -0,0 +1,74 @@ +{ + "fileName": "REVLib-2025.0.0.json", + "name": "REVLib", + "version": "2025.0.0", + "frcYear": "2025", + "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", + "mavenUrls": [ + "https://maven.revrobotics.com/" + ], + "jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2025.json", + "javaDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-java", + "version": "2025.0.0" + } + ], + "jniDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2025.0.0", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "windowsx86", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-cpp", + "version": "2025.0.0", + "libName": "REVLib", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "windowsx86", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2025.0.0", + "libName": "REVLibDriver", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "windowsx86", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/WPILibNewCommands.json b/vendordeps/WPILibNewCommands.json index 4143e090..3718e0ac 100644 --- a/vendordeps/WPILibNewCommands.json +++ b/vendordeps/WPILibNewCommands.json @@ -1,38 +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" - ] - } - ] -} \ No newline at end of file + "fileName": "WPILibNewCommands.json", + "name": "WPILib-New-Commands", + "version": "1.0.0", + "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", + "frcYear": "2025", + "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" + ] + } + ] +} diff --git a/vendordeps/photonlib.json b/vendordeps/photonlib.json index 8c565032..db43d6d1 100644 --- a/vendordeps/photonlib.json +++ b/vendordeps/photonlib.json @@ -1,20 +1,34 @@ { "fileName": "photonlib.json", "name": "photonlib", - "version": "v2024.2.8", + "version": "v2025.0.0-beta-8", "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", - "frcYear": "2024", + "frcYear": "2025", "mavenUrls": [ "https://maven.photonvision.org/repository/internal", "https://maven.photonvision.org/repository/snapshots" ], "jsonUrl": "https://maven.photonvision.org/repository/internal/org/photonvision/photonlib-json/1.0/photonlib-json-1.0.json", - "jniDependencies": [], + "jniDependencies": [ + { + "groupId": "org.photonvision", + "artifactId": "photontargeting-cpp", + "version": "v2025.0.0-beta-8", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + } + ], "cppDependencies": [ { "groupId": "org.photonvision", "artifactId": "photonlib-cpp", - "version": "v2024.2.8", + "version": "v2025.0.0-beta-8", "libName": "photonlib", "headerClassifier": "headers", "sharedLibrary": true, @@ -29,7 +43,7 @@ { "groupId": "org.photonvision", "artifactId": "photontargeting-cpp", - "version": "v2024.2.8", + "version": "v2025.0.0-beta-8", "libName": "photontargeting", "headerClassifier": "headers", "sharedLibrary": true, @@ -46,12 +60,12 @@ { "groupId": "org.photonvision", "artifactId": "photonlib-java", - "version": "v2024.2.8" + "version": "v2025.0.0-beta-8" }, { "groupId": "org.photonvision", "artifactId": "photontargeting-java", - "version": "v2024.2.8" + "version": "v2025.0.0-beta-8" } ] } \ No newline at end of file