Skip to content

Commit

Permalink
added wheel radius buttons to dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
r4stered committed Oct 29, 2024
1 parent 59ba080 commit 9e6efc9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/cpp/RobotContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ void RobotContainer::ConfigureBindings() {
// driverController.POVRight().OnTrue(swerveSubsystem.TunePosePID([this] { return
// driverController.Start().Get(); }));

// controller.Back().WhileTrue(
// swerveSubsystem.WheelRadius(frc2::sysid::Direction::kReverse));
// controller.Start().WhileTrue(
// swerveSubsystem.WheelRadius(frc2::sysid::Direction::kForward));
tuningTable->PutBoolean("WheelRadiusFwd", false);
tuningTable->PutBoolean("WheelRadiusRev", false);


wheelRadFwdBtn.WhileTrue(swerveSubsystem.WheelRadius(frc2::sysid::Direction::kForward));
wheelRadRevBtn.WhileTrue(swerveSubsystem.WheelRadius(frc2::sysid::Direction::kReverse));

operatorController.A().WhileTrue(shooterSubsystem.RunShooter(
[] { return consts::shooter::PRESET_SPEEDS::AMP; }));
Expand Down
6 changes: 6 additions & 0 deletions src/main/include/RobotContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <frc2/command/CommandPtr.h>
//#include <str/CommandLogitechController.h>
#include <frc2/command/button/CommandXboxController.h>
#include <frc2/command/button/NetworkButton.h>

#include <functional>

Expand Down Expand Up @@ -38,6 +39,11 @@ class RobotContainer {
frc2::CommandXboxController operatorController{1};
//frc2::CommandLogitechController sylaceController{2};

std::shared_ptr<nt::NetworkTable> tuningTable{nt::NetworkTableInstance::GetDefault().GetTable("Tuning")};

frc2::NetworkButton wheelRadFwdBtn{tuningTable, "WheelRadiusFwd"};
frc2::NetworkButton wheelRadRevBtn{tuningTable, "WheelRadiusRev"};

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

0 comments on commit 9e6efc9

Please sign in to comment.