|
|||||||||
| 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, n_simProperties |
| 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. |
void |
setRelayValue(Relay.Value relayValue)
Operate the relay for the compressor. |
void |
start()
Start the compressor. |
void |
stop()
Stop the compressor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 SensorBasepublic void setRelayValue(Relay.Value relayValue)
relayValue - the value to set the relay topublic boolean getPressureSwitchValue()
public void start()
public void stop()
public boolean enabled()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||