public class Solenoid extends SolenoidBase implements LiveWindowSendable
m_allocated, m_moduleNumber
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
Constructor and Description |
---|
Solenoid(int channel)
Constructor using the default PCM ID (0)
|
Solenoid(int moduleNumber,
int channel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Destructor.
|
boolean |
get()
Read the current value of the solenoid.
|
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.
|
boolean |
isBlackListed()
Check if solenoid is blacklisted.
|
void |
set(boolean on)
Set the value of a solenoid.
|
void |
startLiveWindowMode()
Start having this sendable object automatically respond to
value changes reflect the value on the table.
|
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.
|
clearAllPCMStickyFaults, getAll, getPCMSolenoidBlackList, getPCMSolenoidVoltageFault, getPCMSolenoidVoltageStickyFault, set
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
public Solenoid(int channel)
channel
- The channel on the PCM to control.public Solenoid(int moduleNumber, int channel)
moduleNumber
- The CAN ID of the PCM the solenoid is attached to.channel
- The channel on the PCM to control (0..7).public void free()
free
in class SensorBase
public void set(boolean on)
on
- Turn the solenoid output off or on.public boolean get()
public boolean isBlackListed()
SolenoidBase.clearAllPCMStickyFaults()
public String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
public edu.wpi.first.wpilibj.tables.ITable getTable()
public void updateTable()
updateTable
in interface LiveWindowSendable
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
Copyright © 2015. All rights reserved.