mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[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:
@@ -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() {
|
||||
|
||||
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user