Package edu.wpi.first.wpilibj
Class SolenoidBase
- java.lang.Object
-
- edu.wpi.first.wpilibj.SolenoidBase
-
- Direct Known Subclasses:
DoubleSolenoid,Solenoid
public class SolenoidBase extends Object
SolenoidBase class is the common base class for theSolenoidandDoubleSolenoidclasses.
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_moduleNumber
-
Constructor Summary
Constructors Modifier Constructor Description protectedSolenoidBase(int moduleNumber)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAllPCMStickyFaults()Clear ALL sticky faults inside PCM that Compressor is wired to.static voidclearAllPCMStickyFaults(int moduleNumber)Clear ALL sticky faults inside PCM that Compressor is wired to.intgetAll()Read all 8 solenoids from the module used by this solenoid as a single byte.static intgetAll(int moduleNumber)Read all 8 solenoids from the specified module as a single byte.intgetPCMSolenoidBlackList()Reads complete solenoid blacklist for all 8 solenoids as a single byte.static intgetPCMSolenoidBlackList(int moduleNumber)Reads complete solenoid blacklist for all 8 solenoids as a single byte.booleangetPCMSolenoidVoltageFault()The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.static booleangetPCMSolenoidVoltageFault(int moduleNumber)The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.booleangetPCMSolenoidVoltageStickyFault()If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.static booleangetPCMSolenoidVoltageStickyFault(int moduleNumber)If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.
-
-
-
Method Detail
-
getAll
public static int getAll(int moduleNumber)
Read all 8 solenoids from the specified module as a single byte.- Parameters:
moduleNumber- the module number to read- Returns:
- The current value of all 8 solenoids on the module.
-
getAll
public int getAll()
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
public static int getPCMSolenoidBlackList(int moduleNumber)
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.- Parameters:
moduleNumber- the module number to read- Returns:
- The solenoid blacklist of all 8 solenoids on the module.
- See Also:
clearAllPCMStickyFaults()
-
getPCMSolenoidBlackList
public int getPCMSolenoidBlackList()
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.- Returns:
- The solenoid blacklist of all 8 solenoids on the module.
- See Also:
clearAllPCMStickyFaults()
-
getPCMSolenoidVoltageStickyFault
public static boolean getPCMSolenoidVoltageStickyFault(int moduleNumber)
If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.- Parameters:
moduleNumber- the module number to read- Returns:
- true if PCM sticky fault is set
-
getPCMSolenoidVoltageStickyFault
public boolean getPCMSolenoidVoltageStickyFault()
If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.- Returns:
- true if PCM sticky fault is set
-
getPCMSolenoidVoltageFault
public static boolean getPCMSolenoidVoltageFault(int moduleNumber)
The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.- Parameters:
moduleNumber- the module number to read- Returns:
- true if PCM is in fault state.
-
getPCMSolenoidVoltageFault
public boolean getPCMSolenoidVoltageFault()
The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.- Returns:
- true if PCM is in fault state.
-
clearAllPCMStickyFaults
public static void clearAllPCMStickyFaults(int moduleNumber)
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.
- Parameters:
moduleNumber- the module number to read
-
clearAllPCMStickyFaults
public void clearAllPCMStickyFaults()
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.
-
-