public class AnalogAccelerometer extends SensorBase implements PIDSource, LiveWindowSendable
PIDSource.PIDSourceParameterkAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond| Constructor and Description |
|---|
AnalogAccelerometer(AnalogInput channel)
Create a new instance of Accelerometer from an existing AnalogChannel.
|
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
free()
Delete the analog components used for the accelerometer.
|
double |
getAcceleration()
Return the acceleration in Gs.
|
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.
|
double |
pidGet()
Get the Acceleration for the PID Source parent.
|
void |
setSensitivity(double sensitivity)
Set the accelerometer sensitivity.
|
void |
setZero(double zero)
Set the voltage that corresponds to 0 G.
|
void |
startLiveWindowMode()
Analog Channels don't have to do anything special when entering the LiveWindow.
|
void |
stopLiveWindowMode()
Analog Channels don't have to do anything special when exiting the LiveWindow.
|
void |
updateTable()
Update the table for this sendable object with the latest
values.
|
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModulepublic AnalogAccelerometer(int channel)
channel - The channel number for the analog input the accelerometer is connected topublic AnalogAccelerometer(AnalogInput channel)
channel - The existing AnalogInput object for the analog input the accelerometer is connected topublic void free()
free in class SensorBasepublic double getAcceleration()
public void setSensitivity(double sensitivity)
sensitivity - The sensitivity of accelerometer in Volts per G.public void setZero(double zero)
zero - The zero G voltage.public double pidGet()
public String getSmartDashboardType()
getSmartDashboardType in interface Sendablepublic void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
public edu.wpi.first.wpilibj.tables.ITable getTable()
public void updateTable()
updateTable in interface LiveWindowSendablepublic void startLiveWindowMode()
startLiveWindowMode in interface LiveWindowSendablepublic void stopLiveWindowMode()
stopLiveWindowMode in interface LiveWindowSendableCopyright © 2015. All rights reserved.