mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Add a unified PCM object (#3331)
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include <hal/PWM.h>
|
||||
#include <hal/Ports.h>
|
||||
#include <hal/Relay.h>
|
||||
#include <hal/Solenoid.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
@@ -19,19 +18,15 @@ const int SensorUtil::kDigitalChannels = HAL_GetNumDigitalChannels();
|
||||
const int SensorUtil::kAnalogInputs = HAL_GetNumAnalogInputs();
|
||||
const int SensorUtil::kAnalogOutputs = HAL_GetNumAnalogOutputs();
|
||||
const int SensorUtil::kSolenoidChannels = HAL_GetNumSolenoidChannels();
|
||||
const int SensorUtil::kSolenoidModules = HAL_GetNumPCMModules();
|
||||
const int SensorUtil::kSolenoidModules = HAL_GetNumCTREPCMModules();
|
||||
const int SensorUtil::kPwmChannels = HAL_GetNumPWMChannels();
|
||||
const int SensorUtil::kRelayChannels = HAL_GetNumRelayHeaders();
|
||||
const int SensorUtil::kPDPChannels = HAL_GetNumPDPChannels();
|
||||
|
||||
int SensorUtil::GetDefaultSolenoidModule() {
|
||||
int SensorUtil::GetDefaultCTREPCMModule() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool SensorUtil::CheckSolenoidModule(int moduleNumber) {
|
||||
return HAL_CheckSolenoidModule(moduleNumber);
|
||||
}
|
||||
|
||||
bool SensorUtil::CheckDigitalChannel(int channel) {
|
||||
return HAL_CheckDIOChannel(channel);
|
||||
}
|
||||
@@ -52,10 +47,6 @@ bool SensorUtil::CheckAnalogOutputChannel(int channel) {
|
||||
return HAL_CheckAnalogOutputChannel(channel);
|
||||
}
|
||||
|
||||
bool SensorUtil::CheckSolenoidChannel(int channel) {
|
||||
return HAL_CheckSolenoidChannel(channel);
|
||||
}
|
||||
|
||||
bool SensorUtil::CheckPDPChannel(int channel) {
|
||||
return HAL_CheckPDPChannel(channel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user