mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Support for the CAN power distribution panel
Change-Id: If4f8f7f050bf1095221cf16f030a6a8a67532656
This commit is contained in:
@@ -17,6 +17,7 @@ const uint32_t SensorBase::kSolenoidChannels;
|
||||
const uint32_t SensorBase::kSolenoidModules;
|
||||
const uint32_t SensorBase::kPwmChannels;
|
||||
const uint32_t SensorBase::kRelayChannels;
|
||||
const uint32_t SensorBase::kPDPChannels;
|
||||
const uint32_t SensorBase::kChassisSlots;
|
||||
SensorBase *SensorBase::m_singletonList = NULL;
|
||||
|
||||
@@ -189,3 +190,15 @@ bool SensorBase::CheckSolenoidChannel(uint32_t channel)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that the power distribution channel number is within limits.
|
||||
*
|
||||
* @return Solenoid channel is valid
|
||||
*/
|
||||
bool SensorBase::CheckPDPChannel(uint32_t channel)
|
||||
{
|
||||
if (channel > 0 && channel <= kPDPChannels)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user