public class DigitalInput extends DigitalSource implements LiveWindowSendable
channels, m_channel, m_port
interrupts, m_interrupt, m_interruptIndex, m_isSynchronousInterrupt
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
Constructor and Description |
---|
DigitalInput(int channel)
Create an instance of a Digital Input class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
get()
Get the value from a digital input channel.
|
boolean |
getAnalogTriggerForRouting()
Is this an analog trigger
|
int |
getChannel()
Get the channel of the digital input
|
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 |
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.
|
free, getChannelForRouting, getModuleForRouting, initDigitalPort
allocateInterrupts, cancelInterrupts, disableInterrupts, enableInterrupts, readFallingTimestamp, readRisingTimestamp, requestInterrupts, requestInterrupts, setUpSourceEdge, waitForInterrupt, waitForInterrupt
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
public DigitalInput(int channel)
channel
- the DIO channel for the digital input 0-9 are on-board, 10-25 are on the MXPpublic boolean get()
public int getChannel()
public boolean getAnalogTriggerForRouting()
DigitalSource
getAnalogTriggerForRouting
in class DigitalSource
public String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
public void updateTable()
updateTable
in interface LiveWindowSendable
public edu.wpi.first.wpilibj.tables.ITable getTable()
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
Copyright © 2015. All rights reserved.