mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[hal] Add a unified PCM object (#3331)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <frc/DoubleSolenoid.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/PneumaticsControlModule.h>
|
||||
#include <frc/Solenoid.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
|
||||
@@ -53,11 +54,13 @@ class Robot : public frc::TimedRobot {
|
||||
private:
|
||||
frc::Joystick m_stick{0};
|
||||
|
||||
frc::PneumaticsControlModule m_pneumaticsModule;
|
||||
|
||||
// Solenoid corresponds to a single solenoid.
|
||||
frc::Solenoid m_solenoid{0};
|
||||
frc::Solenoid m_solenoid{m_pneumaticsModule, 0};
|
||||
|
||||
// DoubleSolenoid corresponds to a double solenoid.
|
||||
frc::DoubleSolenoid m_doubleSolenoid{1, 2};
|
||||
frc::DoubleSolenoid m_doubleSolenoid{m_pneumaticsModule, 1, 2};
|
||||
|
||||
static constexpr int kSolenoidButton = 1;
|
||||
static constexpr int kDoubleSolenoidForward = 2;
|
||||
|
||||
Reference in New Issue
Block a user