mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -64,3 +64,52 @@ uint8_t SolenoidBase::GetAll()
|
||||
}
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Reads complete solenoid blacklist for all 8 solenoids as a single byte.
|
||||
*
|
||||
* If a solenoid is shorted, it is added to the blacklist and
|
||||
* disabled until power cycle, or until faults are cleared.
|
||||
* @see ClearAllPCMStickyFaults()
|
||||
*
|
||||
* @return The solenoid blacklist of all 8 solenoids on the module.
|
||||
*/
|
||||
uint8_t SolenoidBase::GetPCMSolenoidBlackList()
|
||||
{
|
||||
int32_t status = 0;
|
||||
return getPCMSolenoidBlackList(m_ports[0], &status);
|
||||
}
|
||||
/**
|
||||
* @return true if PCM sticky fault is set : The common
|
||||
* highside solenoid voltage rail is too low,
|
||||
* most likely a solenoid channel is shorted.
|
||||
*/
|
||||
bool SolenoidBase::GetPCMSolenoidVoltageStickyFault()
|
||||
{
|
||||
int32_t status = 0;
|
||||
return getPCMSolenoidVoltageStickyFault(m_ports[0], &status);
|
||||
}
|
||||
/**
|
||||
* @return true if PCM is in fault state : The common
|
||||
* highside solenoid voltage rail is too low,
|
||||
* most likely a solenoid channel is shorted.
|
||||
*/
|
||||
bool SolenoidBase::GetPCMSolenoidVoltageFault()
|
||||
{
|
||||
int32_t status = 0;
|
||||
return getPCMSolenoidVoltageFault(m_ports[0], &status);
|
||||
}
|
||||
/**
|
||||
* Clear ALL sticky faults inside PCM that Compressor is wired to.
|
||||
*
|
||||
* If a sticky fault is set, then it will be persistently cleared. Compressor drive
|
||||
* maybe momentarily disable while flags are being cleared. Care should be
|
||||
* taken to not call this too frequently, otherwise normal compressor
|
||||
* functionality may be prevented.
|
||||
*
|
||||
* If no sticky faults are set then this call will have no effect.
|
||||
*/
|
||||
void SolenoidBase::ClearAllPCMStickyFaults()
|
||||
{
|
||||
int32_t status = 0;
|
||||
return clearAllPCMStickyFaults_sol(m_ports[0], &status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user