public class BuiltInAccelerometer extends Object implements Accelerometer, LiveWindowSendable
Accelerometer.Range
Constructor and Description |
---|
BuiltInAccelerometer()
Constructor.
|
BuiltInAccelerometer(Accelerometer.Range range)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getSmartDashboardType() |
edu.wpi.first.wpilibj.tables.ITable |
getTable() |
double |
getX()
Common interface for getting the x axis acceleration
|
double |
getY()
Common interface for getting the y axis acceleration
|
double |
getZ()
Common interface for getting the z axis acceleration
|
void |
initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
Initializes a table for this sendable object.
|
void |
setRange(Accelerometer.Range range)
{inheritdoc}
|
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.
|
public BuiltInAccelerometer(Accelerometer.Range range)
range
- The range the accelerometer will measurepublic BuiltInAccelerometer()
public void setRange(Accelerometer.Range range)
setRange
in interface Accelerometer
range
- The maximum acceleration, positive or negative, that the
accelerometer will measure. Not all accelerometers support all ranges.public double getX()
Accelerometer
getX
in interface Accelerometer
public double getY()
Accelerometer
getY
in interface Accelerometer
public double getZ()
Accelerometer
getZ
in interface Accelerometer
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()
LiveWindowSendable
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
LiveWindowSendable
stopLiveWindowMode
in interface LiveWindowSendable
Copyright © 2015. All rights reserved.