public class Compressor extends SensorBase implements LiveWindowSendable
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
Constructor and Description |
---|
Compressor()
Create an instance of the Compressor
Makes a new instance of the compressor using the default PCM ID (0).
|
Compressor(int pcmId)
Create an instance of the Compressor
|
Modifier and Type | Method and Description |
---|---|
void |
clearAllPCMStickyFaults()
Clear ALL sticky faults inside PCM that Compressor is wired to.
|
boolean |
enabled()
Get the enabled status of the compressor
|
boolean |
getClosedLoopControl()
Gets the current operating mode of the PCM
|
float |
getCompressorCurrent()
Get the current being used by the compressor
|
boolean |
getCompressorCurrentTooHighFault() |
boolean |
getCompressorCurrentTooHighStickyFault() |
boolean |
getCompressorNotConnectedFault() |
boolean |
getCompressorNotConnectedStickyFault() |
boolean |
getCompressorShortedFault() |
boolean |
getCompressorShortedStickyFault() |
boolean |
getPressureSwitchValue()
Get the current pressure switch value
|
String |
getSmartDashboardType() |
edu.wpi.first.wpilibj.tables.ITable |
getTable() |
void |
initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
Initializes a table for this sendable object.
|
void |
setClosedLoopControl(boolean on)
Set the PCM in closed loop control mode
|
void |
start()
Start the compressor running in closed loop control mode
Use the method in cases where you would like to manually stop and start the compressor
for applications such as conserving battery or making sure that the compressor motor
doesn't start during critical operations.
|
void |
startLiveWindowMode()
Start having this sendable object automatically respond to
value changes reflect the value on the table.
|
void |
stop()
Stop the compressor from running in closed loop control mode.
|
void |
stopLiveWindowMode()
Stop having this sendable object automatically respond to value
changes.
|
void |
updateTable()
Update the table for this sendable object with the latest
values.
|
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, free, getDefaultSolenoidModule, setDefaultSolenoidModule
public Compressor(int pcmId)
pcmId
- The PCM CAN device ID. Most robots that use PCM will have a single module. Use this
for supporting a second module other than the default.public Compressor()
public void start()
public void stop()
public boolean enabled()
public boolean getPressureSwitchValue()
public float getCompressorCurrent()
public void setClosedLoopControl(boolean on)
on
- If true sets the compressor to be in closed loop control mode otherwise
normal operation of the compressor is disabled.public boolean getClosedLoopControl()
public boolean getCompressorCurrentTooHighFault()
public boolean getCompressorCurrentTooHighStickyFault()
public boolean getCompressorShortedStickyFault()
public boolean getCompressorShortedFault()
public boolean getCompressorNotConnectedStickyFault()
public boolean getCompressorNotConnectedFault()
public void clearAllPCMStickyFaults()
public void startLiveWindowMode()
LiveWindowSendable
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
LiveWindowSendable
stopLiveWindowMode
in interface LiveWindowSendable
public String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
Sendable
public edu.wpi.first.wpilibj.tables.ITable getTable()
public void updateTable()
LiveWindowSendable
updateTable
in interface LiveWindowSendable
Copyright © 2015. All rights reserved.