Package edu.wpi.first.wpilibj
Class SolenoidBase
- java.lang.Object
-
- edu.wpi.first.wpilibj.SendableBase
-
- edu.wpi.first.wpilibj.SolenoidBase
-
- All Implemented Interfaces:
Sendable
,AutoCloseable
- Direct Known Subclasses:
DoubleSolenoid
,Solenoid
public abstract class SolenoidBase extends SendableBase
SolenoidBase class is the common base class for theSolenoid
andDoubleSolenoid
classes.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_moduleNumber
-
Constructor Summary
Constructors Constructor Description SolenoidBase(int moduleNumber)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAllPCMStickyFaults()
Clear ALL sticky faults inside PCM that Compressor is wired to.static void
clearAllPCMStickyFaults(int moduleNumber)
Clear ALL sticky faults inside PCM that Compressor is wired to.int
getAll()
Read all 8 solenoids from the module used by this solenoid as a single byte.static int
getAll(int moduleNumber)
Read all 8 solenoids from the specified module as a single byte.int
getPCMSolenoidBlackList()
Reads complete solenoid blacklist for all 8 solenoids as a single byte.static int
getPCMSolenoidBlackList(int moduleNumber)
Reads complete solenoid blacklist for all 8 solenoids as a single byte.boolean
getPCMSolenoidVoltageFault()
The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.static boolean
getPCMSolenoidVoltageFault(int moduleNumber)
The common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.boolean
getPCMSolenoidVoltageStickyFault()
If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.static boolean
getPCMSolenoidVoltageStickyFault(int moduleNumber)
If true, the common highside solenoid voltage rail is too low, most likely a solenoid channel is shorted.-
Methods inherited from class edu.wpi.first.wpilibj.SendableBase
addChild, close, free, getName, getSubsystem, setName, setName, setName, setSubsystem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj.Sendable
initSendable, setName
-
-
-
-
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.
-
-