[hal] Add a unified PCM object (#3331)

This commit is contained in:
Thad House
2021-06-05 22:36:39 -07:00
committed by GitHub
parent dea841103d
commit 0e702eb799
103 changed files with 2643 additions and 5676 deletions

View File

@@ -7,7 +7,8 @@
using namespace HatchConstants;
HatchSubsystem::HatchSubsystem()
: m_hatchSolenoid{kHatchSolenoidPorts[0], kHatchSolenoidPorts[1]} {}
: m_hatchSolenoid{m_pneumaticsModule, kHatchSolenoidPorts[0],
kHatchSolenoidPorts[1]} {}
void HatchSubsystem::GrabHatch() {
m_hatchSolenoid.Set(frc::DoubleSolenoid::kForward);

View File

@@ -5,6 +5,7 @@
#pragma once
#include <frc/DoubleSolenoid.h>
#include <frc/PneumaticsControlModule.h>
#include <frc2/command/SubsystemBase.h>
#include "Constants.h"
@@ -28,5 +29,6 @@ class HatchSubsystem : public frc2::SubsystemBase {
private:
// Components (e.g. motor controllers and sensors) should generally be
// declared private and exposed only through public methods.
frc::PneumaticsControlModule m_pneumaticsModule;
frc::DoubleSolenoid m_hatchSolenoid;
};