mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Artifact artf3925 : PCM : Can't find any user facing java/C++ API for getting/clearing PCM faults
Change-Id: If5cb5b08f685158c5317233c4d9bc8e688138df7
This commit is contained in:
@@ -138,6 +138,32 @@ DoubleSolenoid::Value DoubleSolenoid::Get()
|
||||
if (value & m_reverseMask) return kReverse;
|
||||
return kOff;
|
||||
}
|
||||
/**
|
||||
* Check if the forward solenoid is blacklisted.
|
||||
* If a solenoid is shorted, it is added to the blacklist and
|
||||
* disabled until power cycle, or until faults are cleared.
|
||||
* @see ClearAllPCMStickyFaults()
|
||||
*
|
||||
* @return If solenoid is disabled due to short.
|
||||
*/
|
||||
bool DoubleSolenoid::IsFwdSolenoidBlackListed()
|
||||
{
|
||||
int blackList = GetPCMSolenoidBlackList();
|
||||
return (blackList & m_forwardMask) ? 1 : 0;
|
||||
}
|
||||
/**
|
||||
* Check if the reverse solenoid is blacklisted.
|
||||
* If a solenoid is shorted, it is added to the blacklist and
|
||||
* disabled until power cycle, or until faults are cleared.
|
||||
* @see ClearAllPCMStickyFaults()
|
||||
*
|
||||
* @return If solenoid is disabled due to short.
|
||||
*/
|
||||
bool DoubleSolenoid::IsRevSolenoidBlackListed()
|
||||
{
|
||||
int blackList = GetPCMSolenoidBlackList();
|
||||
return (blackList & m_reverseMask) ? 1 : 0;
|
||||
}
|
||||
|
||||
void DoubleSolenoid::ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew) {
|
||||
Value lvalue = kOff;
|
||||
|
||||
Reference in New Issue
Block a user