SolenoidBase¶
-
class
wpilib.
SolenoidBase
(moduleNumber)[source]¶ Bases:
wpilib.SensorBase
SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Constructor.
Parameters: moduleNumber – The PCM CAN ID -
clearAllPCMStickyFaults
()[source]¶ Clear ALL sticky faults inside the PCM that Solenoid is wired to.
- If a sticky fault is set, then it will be persistently cleared. Compressor drive
- maybe momentarily disable while flages 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.
-
getAll
()[source]¶ Read all 8 solenoids from the module used by this solenoid as a single byte.
Returns: The current value of all 8 solenoids on this module.
-
getPCMSolenoidBlackList
()[source]¶ - 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()
Returns: The solenoid blacklist of all 8 solenoids on the module.
-