Skip to content

Commit

Permalink
Remove Angle Motor configuring
Browse files Browse the repository at this point in the history
  • Loading branch information
clrozeboom authored and thenetworkgrinch committed Oct 8, 2024
1 parent 00fc7e8 commit 6b856d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public RobotContainer()
private void configureBindings()
{
if (DriverStation.isTest()) {
driverXbox.a().onTrue(drivebase.angleMotorPValueCommand());
driverXbox.b().whileTrue(drivebase.sysIdDriveMotorCommand());
driverXbox.x().whileTrue(Commands.runOnce(drivebase::lock, drivebase).repeatedly());
driverXbox.y().whileTrue(drivebase.driveToDistanceCommand(1.0, 0.2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,6 @@ public Command sysIdAngleMotorCommand()
3.0, 5.0, 3.0);
}

/**
* Returns a Command that sets the P value of the angle motors to the value on the SmartDashboard and updates the PIDF
* configuration of each module. The command is run only once and is intended to be used for characterizing the angle
* motors' P value. The P value is read from the SmartDashboard and if it is not present, a default value of 0 is used.
*
* @return a Command that reads the P value of the angle motors from the SmartDashboard and updates the PIDF configuration of each module
*/
public Command angleMotorPValueCommand() {
SmartDashboard.putNumber("Angle Motor P", swerveDrive.getModuleMap().values().iterator().next().getAnglePIDF().p);
return Commands.runOnce(() -> {
swerveDrive.getModuleMap().values().forEach(module -> {
module.getAngleMotor().configurePIDF(new PIDFConfig(SmartDashboard.getNumber("Angle Motor P", 0), 0));
module.getAngleMotor().burnFlash();
});
}, this);
}

/**
* Returns a Command that centers the modules of the SwerveDrive subsystem.
*
Expand Down

0 comments on commit 6b856d3

Please sign in to comment.