mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +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:
@@ -102,7 +102,19 @@ bool Solenoid::Get()
|
||||
uint8_t value = GetAll() & ( 1 << m_channel);
|
||||
return (value != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if 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 Solenoid::IsBlackListed()
|
||||
{
|
||||
int value = GetPCMSolenoidBlackList() & ( 1 << m_channel);
|
||||
return (value != 0);
|
||||
}
|
||||
|
||||
void Solenoid::ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew) {
|
||||
Set(value.b);
|
||||
|
||||
Reference in New Issue
Block a user