Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
Expand Down
29 changes: 16 additions & 13 deletions src/main/java/frc/robot/commands/climber/StopClimber.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
9 changes: 4 additions & 5 deletions src/main/java/frc/robot/commands/sequences/CancelAll.java
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/frc/robot/utils/motor/MotorSimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this supposed to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method .setpositionconversionfactor doesnt not exist for encoder sim anymore, so yes.

encoderSim.setPosition(0.0);
encoderSim.setInverted(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -45,14 +47,17 @@ 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;
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions vendordeps/AdvantageKit.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -12,15 +12,15 @@
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java",
"version": "2025.2.3"
"version": "2025.2.6"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp",
"version": "2025.2.3",
"version": "2025.2.6",
"libName": "PathplannerLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
Loading