From c504d94dbb9f6d53e3c6a4f09c3dd3cd0bfa7ea6 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 2 Dec 2024 07:44:37 +0000 Subject: [PATCH 1/2] update gradle, vendor jsons to 2025-beta --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- vendordeps/AdvantageKit.json | 12 +- ...annerLib.json => PathplannerLib-beta.json} | 16 +-- ...json => Phoenix6-frc2025-beta-latest.json} | 116 ++++++++++-------- vendordeps/REVLib.json | 74 ----------- vendordeps/WPILibNewCommands.json | 2 +- vendordeps/photonlib-v2025.0.0-beta-1.json | 97 +++++++++++++++ vendordeps/playingwithfusion2024.json | 71 ----------- 9 files changed, 182 insertions(+), 210 deletions(-) rename vendordeps/{PathplannerLib.json => PathplannerLib-beta.json} (81%) rename vendordeps/{Phoenix6.json => Phoenix6-frc2025-beta-latest.json} (80%) delete mode 100644 vendordeps/REVLib.json create mode 100644 vendordeps/photonlib-v2025.0.0-beta-1.json delete mode 100644 vendordeps/playingwithfusion2024.json diff --git a/build.gradle b/build.gradle index f15821b..9b06747 100755 --- 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-beta-2" id "com.peterabeles.gversion" version "1.10" id "com.diffplug.spotless" version "6.12.0" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c5c2706..8e975a5 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.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/vendordeps/AdvantageKit.json b/vendordeps/AdvantageKit.json index 5fda88d..498e436 100644 --- a/vendordeps/AdvantageKit.json +++ b/vendordeps/AdvantageKit.json @@ -1,33 +1,33 @@ { "fileName": "AdvantageKit.json", "name": "AdvantageKit", - "version": "3.2.1", + "version": "4.0.0-alpha-1", "uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", - "frcYear": "2024", + "frcYear": "2025", "mavenUrls": [], "jsonUrl": "https://github.com/Mechanical-Advantage/AdvantageKit/releases/latest/download/AdvantageKit.json", "javaDependencies": [ { "groupId": "org.littletonrobotics.akit.junction", "artifactId": "wpilib-shim", - "version": "3.2.1" + "version": "4.0.0-alpha-1" }, { "groupId": "org.littletonrobotics.akit.junction", "artifactId": "junction-core", - "version": "3.2.1" + "version": "4.0.0-alpha-1" }, { "groupId": "org.littletonrobotics.akit.conduit", "artifactId": "conduit-api", - "version": "3.2.1" + "version": "4.0.0-alpha-1" } ], "jniDependencies": [ { "groupId": "org.littletonrobotics.akit.conduit", "artifactId": "conduit-wpilibio", - "version": "3.2.1", + "version": "4.0.0-alpha-1", "skipInvalidPlatforms": false, "isJar": false, "validPlatforms": [ diff --git a/vendordeps/PathplannerLib.json b/vendordeps/PathplannerLib-beta.json similarity index 81% rename from vendordeps/PathplannerLib.json rename to vendordeps/PathplannerLib-beta.json index ebeeb40..e79fe1a 100644 --- a/vendordeps/PathplannerLib.json +++ b/vendordeps/PathplannerLib-beta.json @@ -1,18 +1,18 @@ { - "fileName": "PathplannerLib.json", + "fileName": "PathplannerLib-beta.json", "name": "PathplannerLib", - "version": "2024.2.8", + "version": "2025.0.0-beta-5", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", - "frcYear": "2024", + "frcYear": "2025", "mavenUrls": [ "https://3015rangerrobotics.github.io/pathplannerlib/repo" ], - "jsonUrl": "https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib.json", + "jsonUrl": "https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib-beta.json", "javaDependencies": [ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2024.2.8" + "version": "2025.0.0-beta-5" } ], "jniDependencies": [], @@ -20,19 +20,19 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2024.2.8", + "version": "2025.0.0-beta-5", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false, "skipInvalidPlatforms": true, "binaryPlatforms": [ "windowsx86-64", - "linuxx86-64", "osxuniversal", + "linuxx86-64", "linuxathena", "linuxarm32", "linuxarm64" ] } ] -} +} \ No newline at end of file diff --git a/vendordeps/Phoenix6.json b/vendordeps/Phoenix6-frc2025-beta-latest.json similarity index 80% rename from vendordeps/Phoenix6.json rename to vendordeps/Phoenix6-frc2025-beta-latest.json index 2336e9f..ff0b8c9 100644 --- a/vendordeps/Phoenix6.json +++ b/vendordeps/Phoenix6-frc2025-beta-latest.json @@ -1,76 +1,94 @@ { - "fileName": "Phoenix6.json", + "fileName": "Phoenix6-frc2025-beta-latest.json", "name": "CTRE-Phoenix (v6)", - "version": "24.3.0", - "frcYear": 2024, + "version": "25.0.0-beta-3", + "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-frc2024-latest.json", + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-beta-latest.json", "conflictsWith": [ { - "uuid": "3fcf3402-e646-4fa6-971e-18afe8173b1a", - "errorMessage": "The combined Phoenix-6-And-5 vendordep is no longer supported. Please remove the vendordep and instead add both the latest Phoenix 6 vendordep and Phoenix 5 vendordep.", - "offlineFileName": "Phoenix6And5.json" + "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-beta-latest.json" } ], "javaDependencies": [ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-java", - "version": "24.3.0" + "version": "25.0.0-beta-3" } ], "jniDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "api-cpp", + "version": "25.0.0-beta-3", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "linuxathena" + ], + "simMode": "hwsim" + }, { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "linuxathena" ], "simMode": "hwsim" }, { "groupId": "com.ctre.phoenix6.sim", - "artifactId": "tools-sim", - "version": "24.3.0", + "artifactId": "api-cpp-sim", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" }, { "groupId": "com.ctre.phoenix6.sim", - "artifactId": "simTalonSRX", - "version": "24.3.0", + "artifactId": "tools-sim", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" }, { "groupId": "com.ctre.phoenix6.sim", - "artifactId": "simTalonFX", - "version": "24.3.0", + "artifactId": "simTalonSRX", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -78,12 +96,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -91,12 +110,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -104,12 +124,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -117,12 +138,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -130,12 +152,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -143,12 +166,13 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "24.3.0", + "version": "25.0.0-beta-3", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -158,7 +182,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-cpp", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_Phoenix6_WPI", "headerClassifier": "headers", "sharedLibrary": true, @@ -166,6 +190,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "linuxathena" ], "simMode": "hwsim" @@ -173,7 +198,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_PhoenixTools", "headerClassifier": "headers", "sharedLibrary": true, @@ -181,6 +206,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "linuxathena" ], "simMode": "hwsim" @@ -188,7 +214,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "wpiapi-cpp-sim", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_Phoenix6_WPISim", "headerClassifier": "headers", "sharedLibrary": true, @@ -196,6 +222,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -203,7 +230,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_PhoenixTools_Sim", "headerClassifier": "headers", "sharedLibrary": true, @@ -211,6 +238,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -218,7 +246,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimTalonSRX", "headerClassifier": "headers", "sharedLibrary": true, @@ -226,21 +254,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", - "osxuniversal" - ], - "simMode": "swsim" - }, - { - "groupId": "com.ctre.phoenix6.sim", - "artifactId": "simTalonFX", - "version": "24.3.0", - "libName": "CTRE_SimTalonFX", - "headerClassifier": "headers", - "sharedLibrary": true, - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "windowsx86-64", - "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -248,7 +262,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimVictorSPX", "headerClassifier": "headers", "sharedLibrary": true, @@ -256,6 +270,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -263,7 +278,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimPigeonIMU", "headerClassifier": "headers", "sharedLibrary": true, @@ -271,6 +286,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -278,7 +294,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimCANCoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -286,6 +302,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -293,7 +310,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimProTalonFX", "headerClassifier": "headers", "sharedLibrary": true, @@ -301,6 +318,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -308,7 +326,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimProCANcoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -316,6 +334,7 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" @@ -323,7 +342,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "24.3.0", + "version": "25.0.0-beta-3", "libName": "CTRE_SimProPigeon2", "headerClassifier": "headers", "sharedLibrary": true, @@ -331,9 +350,10 @@ "binaryPlatforms": [ "windowsx86-64", "linuxx86-64", + "linuxarm64", "osxuniversal" ], "simMode": "swsim" } ] -} +} \ No newline at end of file diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib.json deleted file mode 100644 index 6bb009c..0000000 --- a/vendordeps/REVLib.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "fileName": "REVLib.json", - "name": "REVLib", - "version": "2024.2.1", - "frcYear": "2024", - "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", - "mavenUrls": [ - "https://maven.revrobotics.com/" - ], - "jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2024.json", - "javaDependencies": [ - { - "groupId": "com.revrobotics.frc", - "artifactId": "REVLib-java", - "version": "2024.2.1" - } - ], - "jniDependencies": [ - { - "groupId": "com.revrobotics.frc", - "artifactId": "REVLib-driver", - "version": "2024.2.1", - "skipInvalidPlatforms": true, - "isJar": false, - "validPlatforms": [ - "windowsx86-64", - "windowsx86", - "linuxarm64", - "linuxx86-64", - "linuxathena", - "linuxarm32", - "osxuniversal" - ] - } - ], - "cppDependencies": [ - { - "groupId": "com.revrobotics.frc", - "artifactId": "REVLib-cpp", - "version": "2024.2.1", - "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": "2024.2.1", - "libName": "REVLibDriver", - "headerClassifier": "headers", - "sharedLibrary": false, - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "windowsx86-64", - "windowsx86", - "linuxarm64", - "linuxx86-64", - "linuxathena", - "linuxarm32", - "osxuniversal" - ] - } - ] -} diff --git a/vendordeps/WPILibNewCommands.json b/vendordeps/WPILibNewCommands.json index 67bf389..3718e0a 100644 --- a/vendordeps/WPILibNewCommands.json +++ b/vendordeps/WPILibNewCommands.json @@ -3,7 +3,7 @@ "name": "WPILib-New-Commands", "version": "1.0.0", "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", - "frcYear": "2024", + "frcYear": "2025", "mavenUrls": [], "jsonUrl": "", "javaDependencies": [ diff --git a/vendordeps/photonlib-v2025.0.0-beta-1.json b/vendordeps/photonlib-v2025.0.0-beta-1.json new file mode 100644 index 0000000..15e6421 --- /dev/null +++ b/vendordeps/photonlib-v2025.0.0-beta-1.json @@ -0,0 +1,97 @@ +{ + "fileName": "photonlib.json", + "name": "photonlib", + "version": "v2025.0.0-beta-1", + "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", + "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": [ + { + "groupId": "edu.wpi.first.wpilibc", + "artifactId": "wpilibc-cpp", + "version": "2025.1.1-beta-1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + }, + { + "groupId": "org.photonvision", + "artifactId": "photontargeting-cpp", + "version": "v2025.0.0-beta-1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + }, + { + "groupId": "org.photonvision", + "artifactId": "photontargeting-jni", + "version": "v2025.0.0-beta-1", + "skipInvalidPlatforms": true, + "isJar": true, + "validPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + } + ], + "cppDependencies": [ + { + "groupId": "org.photonvision", + "artifactId": "photonlib-cpp", + "version": "v2025.0.0-beta-1", + "libName": "photonlib", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + }, + { + "groupId": "org.photonvision", + "artifactId": "photontargeting-cpp", + "version": "v2025.0.0-beta-1", + "libName": "photontargeting", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + } + ], + "javaDependencies": [ + { + "groupId": "org.photonvision", + "artifactId": "photonlib-java", + "version": "v2025.0.0-beta-1" + }, + { + "groupId": "org.photonvision", + "artifactId": "photontargeting-java", + "version": "v2025.0.0-beta-1" + } + ] +} diff --git a/vendordeps/playingwithfusion2024.json b/vendordeps/playingwithfusion2024.json deleted file mode 100644 index c166cee..0000000 --- a/vendordeps/playingwithfusion2024.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "fileName": "playingwithfusion2024.json", - "name": "PlayingWithFusion", - "version": "2024.03.09", - "uuid": "14b8ad04-24df-11ea-978f-2e728ce88125", - "frcYear": "2024", - "jsonUrl": "https://www.playingwithfusion.com/frc/playingwithfusion2024.json", - "mavenUrls": [ - "https://www.playingwithfusion.com/frc/maven/" - ], - "javaDependencies": [ - { - "groupId": "com.playingwithfusion.frc", - "artifactId": "PlayingWithFusion-java", - "version": "2024.03.09" - } - ], - "jniDependencies": [ - { - "groupId": "com.playingwithfusion.frc", - "artifactId": "PlayingWithFusion-driver", - "version": "2024.03.09", - "isJar": false, - "skipInvalidPlatforms": true, - "validPlatforms": [ - "linuxathena", - "windowsx86-64", - "linuxx86-64", - "osxuniversal", - "linuxarm32", - "linuxarm64" - ] - } - ], - "cppDependencies": [ - { - "groupId": "com.playingwithfusion.frc", - "artifactId": "PlayingWithFusion-cpp", - "version": "2024.03.09", - "headerClassifier": "headers", - "sharedLibrary": false, - "libName": "PlayingWithFusion", - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "linuxathena", - "windowsx86-64", - "linuxx86-64", - "osxuniversal", - "linuxarm32", - "linuxarm64" - ] - }, - { - "groupId": "com.playingwithfusion.frc", - "artifactId": "PlayingWithFusion-driver", - "version": "2024.03.09", - "headerClassifier": "headers", - "sharedLibrary": true, - "libName": "PlayingWithFusionDriver", - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "linuxathena", - "windowsx86-64", - "linuxx86-64", - "osxuniversal", - "linuxarm32", - "linuxarm64" - ] - } - ] -} \ No newline at end of file From 681b4f85588abaaa94365e5a17d8df471e74481d Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 2 Dec 2024 08:19:20 +0000 Subject: [PATCH 2/2] update to match 2025 beta changes/deprecations --- build.gradle | 2 +- .../flywheels/FlywheelsIOTalonFX.java | 54 +++++++++---------- .../rollers/GenericRollersIOTalonFX.java | 12 +++-- .../frc/robot/subsystems/swerve/Drive.java | 7 ++- .../subsystems/swerve/GyroIOPigeon2.java | 6 ++- .../subsystems/swerve/ModuleIOTalonFX.java | 24 +++++---- .../swerve/controllers/TeleopController.java | 10 ++++ 7 files changed, 69 insertions(+), 46 deletions(-) diff --git a/build.gradle b/build.gradle index 9b06747..17af8af 100755 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2" + id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1" id "com.peterabeles.gversion" version "1.10" id "com.diffplug.spotless" version "6.12.0" } diff --git a/src/main/java/frc/robot/subsystems/flywheels/FlywheelsIOTalonFX.java b/src/main/java/frc/robot/subsystems/flywheels/FlywheelsIOTalonFX.java index 8df6da6..75b8044 100644 --- a/src/main/java/frc/robot/subsystems/flywheels/FlywheelsIOTalonFX.java +++ b/src/main/java/frc/robot/subsystems/flywheels/FlywheelsIOTalonFX.java @@ -9,23 +9,29 @@ import com.ctre.phoenix6.controls.NeutralOut; import com.ctre.phoenix6.controls.VelocityVoltage; import com.ctre.phoenix6.hardware.TalonFX; +import com.ctre.phoenix6.signals.InvertedValue; import com.ctre.phoenix6.signals.NeutralModeValue; import edu.wpi.first.math.util.Units; +import edu.wpi.first.units.measure.Angle; +import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.units.measure.Current; +import edu.wpi.first.units.measure.Temperature; +import edu.wpi.first.units.measure.Voltage; public class FlywheelsIOTalonFX implements FlywheelsIO { private final TalonFX topTalon; private final TalonFX bottomTalon; - private final StatusSignal topPositionRads; - private final StatusSignal topVelocityRPM; - private final StatusSignal topAppliedVolts; - private final StatusSignal topSupplyCurrent; - private final StatusSignal topTemp; - private final StatusSignal bottomPositionRads; - private final StatusSignal bottomVelocityRPM; - private final StatusSignal bottomAppliedVolts; - private final StatusSignal bottomSupplyCurrent; - private final StatusSignal bottomTemp; + private final StatusSignal topPosition; + private final StatusSignal topVelocity; + private final StatusSignal topAppliedVolts; + private final StatusSignal topSupplyCurrent; + private final StatusSignal topTemp; + private final StatusSignal bottomPosition; + private final StatusSignal bottomVelocity; + private final StatusSignal bottomAppliedVolts; + private final StatusSignal bottomSupplyCurrent; + private final StatusSignal bottomTemp; private final Slot0Configs gainsConfig = new Slot0Configs(); private final VelocityVoltage velocityOutput = new VelocityVoltage(0).withUpdateFreqHz(0); @@ -39,6 +45,7 @@ public FlywheelsIOTalonFX() { config.CurrentLimits.SupplyCurrentLimit = 60.0; // FIXME config.CurrentLimits.SupplyCurrentLimitEnable = true; config.MotorOutput.NeutralMode = NeutralModeValue.Coast; + config.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; config.Feedback.SensorToMechanismRatio = FLYWHEEL_CONFIG.reduction(); gainsConfig.kP = GAINS.kP(); @@ -53,17 +60,14 @@ public FlywheelsIOTalonFX() { topTalon.getConfigurator().apply(gainsConfig); bottomTalon.getConfigurator().apply(gainsConfig); - topTalon.setInverted(true); - bottomTalon.setInverted(true); // FIXME - - topPositionRads = topTalon.getPosition(); - topVelocityRPM = topTalon.getVelocity(); + topPosition = topTalon.getPosition(); + topVelocity = topTalon.getVelocity(); topAppliedVolts = topTalon.getMotorVoltage(); topSupplyCurrent = topTalon.getSupplyCurrent(); topTemp = topTalon.getDeviceTemp(); - bottomPositionRads = bottomTalon.getPosition(); - bottomVelocityRPM = bottomTalon.getVelocity(); + bottomPosition = bottomTalon.getPosition(); + bottomVelocity = bottomTalon.getVelocity(); bottomAppliedVolts = bottomTalon.getMotorVoltage(); bottomSupplyCurrent = bottomTalon.getSupplyCurrent(); bottomTemp = bottomTalon.getDeviceTemp(); @@ -73,25 +77,21 @@ public FlywheelsIOTalonFX() { public void updateInputs(FlywheelsIOInputs inputs) { inputs.topMotorConnected = BaseStatusSignal.refreshAll( - topPositionRads, topVelocityRPM, topAppliedVolts, topSupplyCurrent, topTemp) + topPosition, topVelocity, topAppliedVolts, topSupplyCurrent, topTemp) .isOK(); inputs.bottomMotorConnected = BaseStatusSignal.refreshAll( - bottomPositionRads, - bottomVelocityRPM, - bottomAppliedVolts, - bottomSupplyCurrent, - bottomTemp) + bottomPosition, bottomVelocity, bottomAppliedVolts, bottomSupplyCurrent, bottomTemp) .isOK(); - inputs.topPositionRads = Units.rotationsToRadians(topPositionRads.getValueAsDouble()); - inputs.topVelocityRPM = topVelocityRPM.getValueAsDouble() * 60.0; + inputs.topPositionRads = Units.rotationsToRadians(topPosition.getValueAsDouble()); + inputs.topVelocityRPM = topVelocity.getValueAsDouble() * 60.0; inputs.topAppliedVolts = topAppliedVolts.getValueAsDouble(); inputs.topSupplyCurrent = topSupplyCurrent.getValueAsDouble(); inputs.topTempCelcius = topTemp.getValueAsDouble(); - inputs.bottomPositionRads = Units.rotationsToRadians(bottomPositionRads.getValueAsDouble()); - inputs.bottomVelocityRPM = bottomVelocityRPM.getValueAsDouble() * 60.0; + inputs.bottomPositionRads = Units.rotationsToRadians(bottomPosition.getValueAsDouble()); + inputs.bottomVelocityRPM = bottomVelocity.getValueAsDouble() * 60.0; inputs.bottomAppliedVolts = bottomAppliedVolts.getValueAsDouble(); inputs.bottomSupplyCurrent = bottomSupplyCurrent.getValueAsDouble(); inputs.bottomTempCelcius = bottomTemp.getValueAsDouble(); diff --git a/src/main/java/frc/robot/subsystems/rollers/GenericRollersIOTalonFX.java b/src/main/java/frc/robot/subsystems/rollers/GenericRollersIOTalonFX.java index e689460..c3386b1 100644 --- a/src/main/java/frc/robot/subsystems/rollers/GenericRollersIOTalonFX.java +++ b/src/main/java/frc/robot/subsystems/rollers/GenericRollersIOTalonFX.java @@ -9,14 +9,18 @@ import com.ctre.phoenix6.signals.InvertedValue; import com.ctre.phoenix6.signals.NeutralModeValue; import edu.wpi.first.math.util.Units; +import edu.wpi.first.units.measure.Angle; +import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.units.measure.Current; +import edu.wpi.first.units.measure.Voltage; public abstract class GenericRollersIOTalonFX implements GenericRollersIO { private final TalonFX talon; - private final StatusSignal position; - private final StatusSignal velocity; - private final StatusSignal appliedVolts; - private final StatusSignal supplyCurrent; + private final StatusSignal position; + private final StatusSignal velocity; + private final StatusSignal appliedVolts; + private final StatusSignal supplyCurrent; private final VoltageOut voltageOutput = new VoltageOut(0).withUpdateFreqHz(0); private final NeutralOut neutralOutput = new NeutralOut(); diff --git a/src/main/java/frc/robot/subsystems/swerve/Drive.java b/src/main/java/frc/robot/subsystems/swerve/Drive.java index 03bf797..5b70ba3 100644 --- a/src/main/java/frc/robot/subsystems/swerve/Drive.java +++ b/src/main/java/frc/robot/subsystems/swerve/Drive.java @@ -74,6 +74,9 @@ public void periodic() { /* use kinematics to get desired module states */ ChassisSpeeds discretizedSpeeds = ChassisSpeeds.discretize(targetSpeeds, Constants.PERIODIC_LOOP_SEC); + /* ChassisSpeeds discretizedSpeeds = targetSpeeds; // FIXME + discretizedSpeeds.discretize(Constants.PERIODIC_LOOP_SEC); */ + SwerveModuleState[] moduleTargetStates = KINEMATICS.toSwerveModuleStates(discretizedSpeeds); SwerveDriveKinematics.desaturateWheelSpeeds( moduleTargetStates, DRIVE_CONFIG.maxLinearVelocity()); @@ -81,8 +84,8 @@ public void periodic() { SwerveModuleState[] optimizedTargetStates = new SwerveModuleState[4]; for (int i = 0; i < modules.length; i++) { - optimizedTargetStates[i] = - SwerveModuleState.optimize(moduleTargetStates[i], modules[i].getSteerHeading()); + optimizedTargetStates[i] = moduleTargetStates[i]; + optimizedTargetStates[i].optimize(modules[i].getSteerHeading()); modules[i].runToSetpoint(optimizedTargetStates[i]); } diff --git a/src/main/java/frc/robot/subsystems/swerve/GyroIOPigeon2.java b/src/main/java/frc/robot/subsystems/swerve/GyroIOPigeon2.java index 84e7442..3300221 100644 --- a/src/main/java/frc/robot/subsystems/swerve/GyroIOPigeon2.java +++ b/src/main/java/frc/robot/subsystems/swerve/GyroIOPigeon2.java @@ -6,11 +6,13 @@ import com.ctre.phoenix6.hardware.Pigeon2; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.util.Units; +import edu.wpi.first.units.measure.Angle; +import edu.wpi.first.units.measure.AngularVelocity; public class GyroIOPigeon2 implements GyroIO { private final Pigeon2 pigeon; - private final StatusSignal yaw; - private final StatusSignal yawVelocity; + private final StatusSignal yaw; + private final StatusSignal yawVelocity; public GyroIOPigeon2() { pigeon = new Pigeon2(DriveConstants.GYRO_ID); diff --git a/src/main/java/frc/robot/subsystems/swerve/ModuleIOTalonFX.java b/src/main/java/frc/robot/subsystems/swerve/ModuleIOTalonFX.java index a8f945c..503e86d 100644 --- a/src/main/java/frc/robot/subsystems/swerve/ModuleIOTalonFX.java +++ b/src/main/java/frc/robot/subsystems/swerve/ModuleIOTalonFX.java @@ -14,6 +14,10 @@ import com.ctre.phoenix6.signals.NeutralModeValue; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.util.Units; +import edu.wpi.first.units.measure.Angle; +import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.units.measure.Current; +import edu.wpi.first.units.measure.Voltage; import frc.robot.subsystems.swerve.DriveConstants.Gains; import frc.robot.subsystems.swerve.DriveConstants.ModuleConfig; import frc.robot.subsystems.swerve.DriveConstants.MotionProfileGains; @@ -24,18 +28,18 @@ public class ModuleIOTalonFX implements ModuleIO { private final TalonFX steerTalon; private final CANcoder encoder; - private final StatusSignal drivePosition; - private final StatusSignal driveVelocity; - private final StatusSignal driveAppliedVolts; - private final StatusSignal driveSupplyCurrent; - private final StatusSignal driveStatorCurrent; + private final StatusSignal drivePosition; + private final StatusSignal driveVelocity; + private final StatusSignal driveAppliedVolts; + private final StatusSignal driveSupplyCurrent; + private final StatusSignal driveStatorCurrent; private final Supplier steerAbsolutePosition; - private final StatusSignal steerPosition; - private final StatusSignal steerVelocity; - private final StatusSignal steerAppliedVolts; - private final StatusSignal steerSupplyCurrent; - private final StatusSignal steerStatorCurrent; + private final StatusSignal steerPosition; + private final StatusSignal steerVelocity; + private final StatusSignal steerAppliedVolts; + private final StatusSignal steerSupplyCurrent; + private final StatusSignal steerStatorCurrent; private final TalonFXConfiguration driveConfig = new TalonFXConfiguration(); private final TalonFXConfiguration steerConfig = new TalonFXConfiguration(); diff --git a/src/main/java/frc/robot/subsystems/swerve/controllers/TeleopController.java b/src/main/java/frc/robot/subsystems/swerve/controllers/TeleopController.java index 1756c05..e619fb7 100644 --- a/src/main/java/frc/robot/subsystems/swerve/controllers/TeleopController.java +++ b/src/main/java/frc/robot/subsystems/swerve/controllers/TeleopController.java @@ -35,6 +35,16 @@ public ChassisSpeeds update(Rotation2d yaw) { linearVelocity.getY() * DRIVE_CONFIG.maxLinearVelocity(), omega * DRIVE_CONFIG.maxAngularVelocity(), yaw); + + /* ChassisSpeeds speeds = + new ChassisSpeeds( + linearVelocity.getX() * DRIVE_CONFIG.maxLinearVelocity(), + linearVelocity.getY() * DRIVE_CONFIG.maxLinearVelocity(), + omega * DRIVE_CONFIG.maxAngularVelocity()); + // eventually run off of pose estimation? + speeds.toRobotRelativeSpeeds(yaw); + + return speeds; */ } public Translation2d calculateLinearVelocity(double x, double y) {