From 10f9c119bdc1460a2cd316682444f3a810f06ac5 Mon Sep 17 00:00:00 2001 From: Lev Strougov <62769580+Levercpu@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:28:14 -0400 Subject: [PATCH] linted main alongside updating all vendordeps and wpilib. --- build.gradle | 2 +- .../robot/commands/climber/StopClimber.java | 29 +++--- .../robot/commands/sequences/CancelAll.java | 9 +- .../frc/robot/utils/motor/MotorSimulator.java | 8 +- .../robot/utils/simulation/ArmSimulator.java | 7 +- .../utils/simulation/ClimberSimulator.java | 7 +- .../utils/simulation/IntakeSimulator.java | 8 +- vendordeps/AdvantageKit.json | 6 +- ....2.3.json => PathplannerLib-2025.2.6.json} | 8 +- ...enix6-25.2.2.json => Phoenix6-25.3.2.json} | 88 +++++++++++++------ vendordeps/REVLib.json | 10 +-- 11 files changed, 117 insertions(+), 65 deletions(-) rename vendordeps/{PathplannerLib-2025.2.3.json => PathplannerLib-2025.2.6.json} (87%) rename vendordeps/{Phoenix6-25.2.2.json => Phoenix6-25.3.2.json} (86%) diff --git a/build.gradle b/build.gradle index e094ff5c..59972f49 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2025.3.1" + id "edu.wpi.first.GradleRIO" version "2025.3.2" id "com.peterabeles.gversion" version "1.10" id "com.diffplug.spotless" version "7.0.2" } diff --git a/src/main/java/frc/robot/commands/climber/StopClimber.java b/src/main/java/frc/robot/commands/climber/StopClimber.java index eae2a033..2811e498 100644 --- a/src/main/java/frc/robot/commands/climber/StopClimber.java +++ b/src/main/java/frc/robot/commands/climber/StopClimber.java @@ -4,17 +4,20 @@ import frc.robot.utils.logging.commands.LoggableCommand; public class StopClimber extends LoggableCommand { - private ClimberSubsystem climber; - public StopClimber(ClimberSubsystem climber) { - this.climber = climber; - addRequirements(climber); - } - @Override - public void initialize() { - climber.stopClimber(); - } - @Override - public boolean isFinished() { - return true; - } + private ClimberSubsystem climber; + + public StopClimber(ClimberSubsystem climber) { + this.climber = climber; + addRequirements(climber); + } + + @Override + public void initialize() { + climber.stopClimber(); + } + + @Override + public boolean isFinished() { + return true; + } } diff --git a/src/main/java/frc/robot/commands/sequences/CancelAll.java b/src/main/java/frc/robot/commands/sequences/CancelAll.java index 476efc4d..745b0628 100644 --- a/src/main/java/frc/robot/commands/sequences/CancelAll.java +++ b/src/main/java/frc/robot/commands/sequences/CancelAll.java @@ -10,17 +10,16 @@ import frc.robot.subsystems.algaebyebyetilt.AlgaeByeByeTiltSubsystem; import frc.robot.subsystems.climber.ClimberSubsystem; import frc.robot.subsystems.elevator.ElevatorSubsystem; -import frc.robot.subsystems.swervev3.SwerveDrivetrain; import frc.robot.utils.logging.commands.LoggableSequentialCommandGroup; /** Add your docs here. */ public class CancelAll extends LoggableSequentialCommandGroup { public CancelAll( - AlgaeByeByeTiltSubsystem algaeByeByeTiltSubsystem, - AlgaeByeByeRollerSubsystem algaebyebyeroller, - ElevatorSubsystem elevatorSubsystem, - ClimberSubsystem climberSubsystem) { + AlgaeByeByeTiltSubsystem algaeByeByeTiltSubsystem, + AlgaeByeByeRollerSubsystem algaebyebyeroller, + ElevatorSubsystem elevatorSubsystem, + ClimberSubsystem climberSubsystem) { super( new StopClimber(climberSubsystem), new ByeByeAllDone(algaeByeByeTiltSubsystem, algaebyebyeroller, elevatorSubsystem), diff --git a/src/main/java/frc/robot/utils/motor/MotorSimulator.java b/src/main/java/frc/robot/utils/motor/MotorSimulator.java index db9ccb08..b9f545f9 100644 --- a/src/main/java/frc/robot/utils/motor/MotorSimulator.java +++ b/src/main/java/frc/robot/utils/motor/MotorSimulator.java @@ -6,6 +6,8 @@ import com.revrobotics.sim.SparkMaxSim; import com.revrobotics.sim.SparkRelativeEncoderSim; import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.SparkBaseConfig; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.math.system.plant.DCMotor; import org.littletonrobotics.junction.mechanism.LoggedMechanismLigament2d; @@ -19,14 +21,16 @@ public class MotorSimulator { private final LoggedMechanismLigament2d ligament; // The encoder simulator from the simulated motor private final SparkRelativeEncoderSim encoderSim; + private final SparkBaseConfig config; public MotorSimulator(SparkMax motor, LoggedMechanismLigament2d ligament) { this.motor = motor; motorSim = new SparkMaxSim(motor, gearbox); this.ligament = ligament; encoderSim = motorSim.getRelativeEncoderSim(); - - encoderSim.setPositionConversionFactor(1.0); + config = new SparkMaxConfig(); + config.encoder.positionConversionFactor(1.0); + motor.configure(config, null, null); encoderSim.setPosition(0.0); encoderSim.setInverted(false); } diff --git a/src/main/java/frc/robot/utils/simulation/ArmSimulator.java b/src/main/java/frc/robot/utils/simulation/ArmSimulator.java index 0356c88b..ecb78d4a 100644 --- a/src/main/java/frc/robot/utils/simulation/ArmSimulator.java +++ b/src/main/java/frc/robot/utils/simulation/ArmSimulator.java @@ -7,6 +7,8 @@ import com.revrobotics.sim.SparkMaxSim; import com.revrobotics.sim.SparkRelativeEncoderSim; import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.SparkBaseConfig; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.system.plant.DCMotor; import edu.wpi.first.wpilibj.simulation.BatterySim; @@ -40,6 +42,7 @@ public class ArmSimulator { private final SingleJointedArmSim armSim; private final double armGearing; private final String name; + private final SparkBaseConfig config; /** Constructor. */ public ArmSimulator(SparkMax motor, ArmParameters params, LoggedMechanismLigament2d ligament) { @@ -61,7 +64,9 @@ public ArmSimulator(SparkMax motor, ArmParameters params, LoggedMechanismLigamen encoderSim = motorSim.getRelativeEncoderSim(); forwardSwitchSim = motorSim.getForwardLimitSwitchSim(); reverseSwitchSim = motorSim.getReverseLimitSwitchSim(); - encoderSim.setPositionConversionFactor(1.0); + config = new SparkMaxConfig(); + config.encoder.positionConversionFactor(1.0); + motor.configure(config, null, null); encoderSim.setPosition(0.0); encoderSim.setInverted(false); } diff --git a/src/main/java/frc/robot/utils/simulation/ClimberSimulator.java b/src/main/java/frc/robot/utils/simulation/ClimberSimulator.java index 66897b89..9f7c8790 100644 --- a/src/main/java/frc/robot/utils/simulation/ClimberSimulator.java +++ b/src/main/java/frc/robot/utils/simulation/ClimberSimulator.java @@ -5,6 +5,8 @@ import com.revrobotics.sim.SparkMaxSim; import com.revrobotics.sim.SparkRelativeEncoderSim; import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.SparkBaseConfig; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.math.system.plant.DCMotor; import edu.wpi.first.units.measure.Angle; import org.littletonrobotics.junction.mechanism.LoggedMechanismLigament2d; @@ -45,6 +47,7 @@ public class ClimberSimulator { private final LoggedMechanismLigament2d ligament; // The encoder simulator from the simulated motor private final SparkRelativeEncoderSim encoderSim; + private SparkBaseConfig config; public ClimberSimulator(SparkMax motor, LoggedMechanismLigament2d ligament) { this.motor = motor; @@ -52,7 +55,9 @@ public ClimberSimulator(SparkMax motor, LoggedMechanismLigament2d ligament) { this.ligament = ligament; encoderSim = motorSim.getRelativeEncoderSim(); - encoderSim.setPositionConversionFactor(1.0); + config = new SparkMaxConfig(); + config.encoder.positionConversionFactor(1.0); + motor.configure(config, null, null); encoderSim.setPosition(0.0); encoderSim.setInverted(false); } diff --git a/src/main/java/frc/robot/utils/simulation/IntakeSimulator.java b/src/main/java/frc/robot/utils/simulation/IntakeSimulator.java index 73468e77..74d3297a 100644 --- a/src/main/java/frc/robot/utils/simulation/IntakeSimulator.java +++ b/src/main/java/frc/robot/utils/simulation/IntakeSimulator.java @@ -6,6 +6,8 @@ import com.revrobotics.sim.SparkMaxSim; import com.revrobotics.sim.SparkRelativeEncoderSim; import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.config.SparkBaseConfig; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.math.system.plant.DCMotor; import org.littletonrobotics.junction.mechanism.LoggedMechanismLigament2d; @@ -51,13 +53,17 @@ private enum Mode { // Mode start point (encoder position when mode change) private double startPoint = 0; + private final SparkBaseConfig config; + public IntakeSimulator(SparkMax motor, LoggedMechanismLigament2d ligament) { this.motor = motor; motorSim = new SparkMaxSim(motor, gearbox); this.ligament = ligament; encoderSim = motorSim.getRelativeEncoderSim(); - encoderSim.setPositionConversionFactor(1.0); + config = new SparkMaxConfig(); + config.encoder.positionConversionFactor(1.0); + motor.configure(config, null, null); encoderSim.setPosition(0.0); encoderSim.setInverted(false); } diff --git a/vendordeps/AdvantageKit.json b/vendordeps/AdvantageKit.json index fa81b2fc..2707c2b7 100644 --- a/vendordeps/AdvantageKit.json +++ b/vendordeps/AdvantageKit.json @@ -1,7 +1,7 @@ { "fileName": "AdvantageKit.json", "name": "AdvantageKit", - "version": "4.1.0", + "version": "4.1.2", "uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", "frcYear": "2025", "mavenUrls": [ @@ -12,14 +12,14 @@ { "groupId": "org.littletonrobotics.akit", "artifactId": "akit-java", - "version": "4.1.0" + "version": "4.1.2" } ], "jniDependencies": [ { "groupId": "org.littletonrobotics.akit", "artifactId": "akit-wpilibio", - "version": "4.1.0", + "version": "4.1.2", "skipInvalidPlatforms": false, "isJar": false, "validPlatforms": [ diff --git a/vendordeps/PathplannerLib-2025.2.3.json b/vendordeps/PathplannerLib-2025.2.6.json similarity index 87% rename from vendordeps/PathplannerLib-2025.2.3.json rename to vendordeps/PathplannerLib-2025.2.6.json index 8d2727f6..85d0263c 100644 --- a/vendordeps/PathplannerLib-2025.2.3.json +++ b/vendordeps/PathplannerLib-2025.2.6.json @@ -1,7 +1,7 @@ { - "fileName": "PathplannerLib-2025.2.3.json", + "fileName": "PathplannerLib-2025.2.6.json", "name": "PathplannerLib", - "version": "2025.2.3", + "version": "2025.2.6", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2025", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2025.2.3" + "version": "2025.2.6" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2025.2.3", + "version": "2025.2.6", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false, diff --git a/vendordeps/Phoenix6-25.2.2.json b/vendordeps/Phoenix6-25.3.2.json similarity index 86% rename from vendordeps/Phoenix6-25.2.2.json rename to vendordeps/Phoenix6-25.3.2.json index 39ae6c5b..368e61cb 100644 --- a/vendordeps/Phoenix6-25.2.2.json +++ b/vendordeps/Phoenix6-25.3.2.json @@ -1,7 +1,7 @@ { - "fileName": "Phoenix6-25.2.2.json", + "fileName": "Phoenix6-25.3.2.json", "name": "CTRE-Phoenix (v6)", - "version": "25.2.2", + "version": "25.3.2", "frcYear": "2025", "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", "mavenUrls": [ @@ -19,14 +19,14 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-java", - "version": "25.2.2" + "version": "25.3.2" } ], "jniDependencies": [ { "groupId": "com.ctre.phoenix6", "artifactId": "api-cpp", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -40,7 +40,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -54,7 +54,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "api-cpp-sim", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -68,7 +68,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -82,7 +82,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -96,7 +96,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -110,7 +110,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -124,7 +124,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -138,7 +138,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -152,7 +152,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -166,7 +166,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -180,7 +180,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "25.2.2", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -194,7 +194,21 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "25.2.2", + "version": "25.3.2", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "25.3.2", "isJar": false, "skipInvalidPlatforms": true, "validPlatforms": [ @@ -210,7 +224,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-cpp", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_Phoenix6_WPI", "headerClassifier": "headers", "sharedLibrary": true, @@ -226,7 +240,7 @@ { "groupId": "com.ctre.phoenix6", "artifactId": "tools", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_PhoenixTools", "headerClassifier": "headers", "sharedLibrary": true, @@ -242,7 +256,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "wpiapi-cpp-sim", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_Phoenix6_WPISim", "headerClassifier": "headers", "sharedLibrary": true, @@ -258,7 +272,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "tools-sim", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_PhoenixTools_Sim", "headerClassifier": "headers", "sharedLibrary": true, @@ -274,7 +288,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simTalonSRX", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimTalonSRX", "headerClassifier": "headers", "sharedLibrary": true, @@ -290,7 +304,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simVictorSPX", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimVictorSPX", "headerClassifier": "headers", "sharedLibrary": true, @@ -306,7 +320,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simPigeonIMU", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimPigeonIMU", "headerClassifier": "headers", "sharedLibrary": true, @@ -322,7 +336,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simCANCoder", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimCANCoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -338,7 +352,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFX", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimProTalonFX", "headerClassifier": "headers", "sharedLibrary": true, @@ -354,7 +368,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProTalonFXS", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimProTalonFXS", "headerClassifier": "headers", "sharedLibrary": true, @@ -370,7 +384,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANcoder", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimProCANcoder", "headerClassifier": "headers", "sharedLibrary": true, @@ -386,7 +400,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProPigeon2", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimProPigeon2", "headerClassifier": "headers", "sharedLibrary": true, @@ -402,7 +416,7 @@ { "groupId": "com.ctre.phoenix6.sim", "artifactId": "simProCANrange", - "version": "25.2.2", + "version": "25.3.2", "libName": "CTRE_SimProCANrange", "headerClassifier": "headers", "sharedLibrary": true, @@ -414,6 +428,22 @@ "osxuniversal" ], "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "25.3.2", + "libName": "CTRE_SimProCANdi", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" } ] } diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib.json index 9658c4a6..459a62f7 100644 --- a/vendordeps/REVLib.json +++ b/vendordeps/REVLib.json @@ -1,7 +1,7 @@ { "fileName": "REVLib.json", "name": "REVLib", - "version": "2025.0.2", + "version": "2025.0.3", "frcYear": "2025", "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", "mavenUrls": [ @@ -12,14 +12,14 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-java", - "version": "2025.0.2" + "version": "2025.0.3" } ], "jniDependencies": [ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.2", + "version": "2025.0.3", "skipInvalidPlatforms": true, "isJar": false, "validPlatforms": [ @@ -36,7 +36,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-cpp", - "version": "2025.0.2", + "version": "2025.0.3", "libName": "REVLib", "headerClassifier": "headers", "sharedLibrary": false, @@ -53,7 +53,7 @@ { "groupId": "com.revrobotics.frc", "artifactId": "REVLib-driver", - "version": "2025.0.2", + "version": "2025.0.3", "libName": "REVLibDriver", "headerClassifier": "headers", "sharedLibrary": false,