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:
@@ -24,13 +24,13 @@ void RapidReactCommandBot::ConfigureBindings() {
|
||||
[this] { return -m_driverController.GetLeftY(); },
|
||||
[this] { return -m_driverController.GetRightX(); }));
|
||||
|
||||
// Deploy the intake with the X button
|
||||
m_driverController.X().OnTrue(m_intake.IntakeCommand());
|
||||
// Retract the intake with the Y button
|
||||
m_driverController.Y().OnTrue(m_intake.RetractCommand());
|
||||
// Deploy the intake with the West Face button
|
||||
m_driverController.WestFace().OnTrue(m_intake.IntakeCommand());
|
||||
// Retract the intake with the North Face button
|
||||
m_driverController.NorthFace().OnTrue(m_intake.RetractCommand());
|
||||
|
||||
// Fire the shooter with the A button
|
||||
m_driverController.A().OnTrue(
|
||||
// Fire the shooter with the South Face button
|
||||
m_driverController.SouthFace().OnTrue(
|
||||
wpi::cmd::cmd::Parallel(
|
||||
m_shooter.ShootCommand(ShooterConstants::kShooterTarget),
|
||||
m_storage.RunCommand())
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "subsystems/Shooter.hpp"
|
||||
#include "subsystems/Storage.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
|
||||
@@ -48,6 +48,6 @@ class RapidReactCommandBot {
|
||||
Pneumatics m_pneumatics;
|
||||
|
||||
// The driver's controller
|
||||
wpi::cmd::CommandXboxController m_driverController{
|
||||
wpi::cmd::CommandGamepad m_driverController{
|
||||
OIConstants::kDriverControllerPort};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user