|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.Compressor
public class Compressor
Compressor object. The Compressor object is designed to handle the operation of the compressor, pressure sensor and relay for a FIRST robot pneumatics system. The Compressor object starts a task which runs in the backround and periodically polls the pressure sensor and operates the relay that controls the compressor.
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Constructor Summary | |
---|---|
Compressor(int pressureSwitchChannel,
int compressorRelayChannel)
Compressor constructor. |
|
Compressor(int pressureSwitchSlot,
int pressureSwitchChannel,
int compresssorRelaySlot,
int compressorRelayChannel)
Compressor constructor. |
Method Summary | |
---|---|
boolean |
enabled()
Get the state of the enabled flag. |
void |
free()
Delete the Compressor object. |
boolean |
getPressureSwitchValue()
Get the pressure switch value. |
String |
getSmartDashboardType()
|
ITable |
getTable()
|
void |
initTable(ITable subtable)
Initializes a table for this sendable object. |
void |
setRelayValue(Relay.Value relayValue)
Operate the relay for the compressor. |
void |
start()
Start the compressor. |
void |
startLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the table. |
void |
stop()
Stop the compressor. |
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. |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Compressor(int pressureSwitchSlot, int pressureSwitchChannel, int compresssorRelaySlot, int compressorRelayChannel)
pressureSwitchSlot
- The module that the pressure switch is attached to.pressureSwitchChannel
- The GPIO channel that the pressure switch is attached to.compresssorRelaySlot
- The module that the compressor relay is attached to.compressorRelayChannel
- The relay channel that the compressor relay is attached to.public Compressor(int pressureSwitchChannel, int compressorRelayChannel)
pressureSwitchChannel
- The GPIO channel that the pressure switch is attached to.compressorRelayChannel
- The relay channel that the compressor relay is attached to.Method Detail |
---|
public void free()
free
in class SensorBase
public void setRelayValue(Relay.Value relayValue)
relayValue
- the value to set the relay topublic boolean getPressureSwitchValue()
public void start()
public void stop()
public boolean enabled()
public String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(ITable subtable)
initTable
in interface Sendable
subtable
- The table to put the values in.public ITable getTable()
getTable
in interface Sendable
public void updateTable()
updateTable
in interface LiveWindowSendable
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |