[wpilib] Prefix all NI DS specific controller classes (#8596)

Easier then the last one that put everything in a sub namespace. By
prefixing the name less things break, and intellisense will be less
confusing to new users during the transition.
This commit is contained in:
Thad House
2026-02-06 21:36:01 -08:00
committed by GitHub
parent 77b2f9802e
commit 5c5d5222f4
133 changed files with 1959 additions and 2682 deletions

View File

@@ -23,9 +23,9 @@ void RobotContainer::ConfigureBindings() {
return m_subsystem.ExampleCondition();
}).OnTrue(ExampleCommand(&m_subsystem).ToPtr());
// Schedule `ExampleMethodCommand` when the Xbox controller's B button is
// Schedule `ExampleMethodCommand` when the Gamepad's East Face button is
// pressed, cancelling on release.
m_driverController.B().WhileTrue(m_subsystem.ExampleMethodCommand());
m_driverController.EastFace().WhileTrue(m_subsystem.ExampleMethodCommand());
}
wpi::cmd::CommandPtr RobotContainer::GetAutonomousCommand() {

View File

@@ -7,7 +7,7 @@
#include "Constants.hpp"
#include "subsystems/ExampleSubsystem.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/button/CommandXboxController.hpp"
#include "wpi/commands2/button/CommandGamepad.hpp"
/**
* This class is where the bulk of the robot should be declared. Since
@@ -24,7 +24,7 @@ class RobotContainer {
private:
// Replace with CommandPS4Controller or CommandJoystick if needed
wpi::cmd::CommandXboxController m_driverController{
wpi::cmd::CommandGamepad m_driverController{
OperatorConstants::kDriverControllerPort};
// The robot's subsystems are defined here...