Skip to content

Commit

Permalink
added buttons for tuning angle and pose
Browse files Browse the repository at this point in the history
  • Loading branch information
r4stered committed Oct 29, 2024
1 parent 9e6efc9 commit 5efb0bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/cpp/RobotContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,16 @@ void RobotContainer::ConfigureBindings() {
// driverController.Start().Get(); }));
// driverController.POVUp().OnTrue(swerveSubsystem.TuneDrivePID([this] { return
// driverController.Start().Get(); }));
// driverController.POVLeft().OnTrue(swerveSubsystem.TuneAnglePID([this] { return
// driverController.Start().Get(); }));
// driverController.POVRight().OnTrue(swerveSubsystem.TunePosePID([this] { return
// driverController.Start().Get(); }));

tuningTable->PutBoolean("WheelRadiusFwd", false);
tuningTable->PutBoolean("WheelRadiusRev", false);

tuningTable->PutBoolean("AnglePIDTuning", false);
tuningTable->PutBoolean("PosePIDTuning", false);

wheelRadFwdBtn.WhileTrue(swerveSubsystem.WheelRadius(frc2::sysid::Direction::kForward));
wheelRadRevBtn.WhileTrue(swerveSubsystem.WheelRadius(frc2::sysid::Direction::kReverse));
anglePIDBtn.OnTrue(swerveSubsystem.TuneAnglePID([this] { return !anglePIDBtn.Get(); }));
posePIDBtn.OnTrue(swerveSubsystem.TunePosePID([this] { return !posePIDBtn.Get(); }));

operatorController.A().WhileTrue(shooterSubsystem.RunShooter(
[] { return consts::shooter::PRESET_SPEEDS::AMP; }));
Expand Down
3 changes: 3 additions & 0 deletions src/main/include/RobotContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class RobotContainer {

frc2::NetworkButton wheelRadFwdBtn{tuningTable, "WheelRadiusFwd"};
frc2::NetworkButton wheelRadRevBtn{tuningTable, "WheelRadiusRev"};
frc2::NetworkButton anglePIDBtn{tuningTable, "AnglePIDTuning"};
frc2::NetworkButton posePIDBtn{tuningTable, "PosePIDTuning"};


frc2::CommandPtr RumbleDriver(std::function<units::second_t()> timeToRumble);
frc2::CommandPtr RumbleOperator(
Expand Down

0 comments on commit 5efb0bf

Please sign in to comment.