Constructor and Description |
---|
ADXSensor(edu.wpi.first.wpilibj.ADXL362 a,
edu.wpi.first.wpilibj.ADXRS450_Gyro g)
Creates an ADXSensor that uses existing instances of the Accelerometer and Gyroscope.
|
ADXSensor(edu.wpi.first.wpilibj.SPI.Port aPort,
edu.wpi.first.wpilibj.SPI.Port gPort)
Creates an ADXSensor on port.
|
ADXSensor(edu.wpi.first.wpilibj.SPI.Port aPort,
edu.wpi.first.wpilibj.SPI.Port gPort,
edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range)
Creates an ADXSensor on port, and sets the Accelerometer's range to range.
|
Modifier and Type | Method and Description |
---|---|
double |
getAcceleration(edu.wpi.first.wpilibj.ADXL362.Axes axis)
Gets the acceleration of a certain Axis of the Accelerometer.
|
edu.wpi.first.wpilibj.ADXL362.AllAxes |
getAccelerations()
Gets the accelerations of all the Axises.
|
double |
getAngle()
Gets the current angle of the Gyroscope.
|
double |
getForPID()
Gets the value being used for PID.
|
double |
getGyroRate()
Gets the rate of the Gyroscope.
|
double |
getX()
Gets the X axis of the Accelerometer.
|
double |
getY()
Gets the Y axis of the Accelerometer.
|
double |
getZ()
Gets the Z axis of the Accelerometer.
|
void |
reset()
Resets this PIDSource.
|
void |
setAccelerometerRange(edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range)
Sets the range of accelerometer.
|
public ADXSensor(edu.wpi.first.wpilibj.SPI.Port aPort, edu.wpi.first.wpilibj.SPI.Port gPort)
aPort
- The SPI.Port the accelerometer is on.gPort
- The SPI.Port the gyroscope is on.public ADXSensor(edu.wpi.first.wpilibj.SPI.Port aPort, edu.wpi.first.wpilibj.SPI.Port gPort, edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range)
aPort
- The SPI.Port the accelerometer is on.gPort
- The SPI.Port the gyroscope is on.public ADXSensor(edu.wpi.first.wpilibj.ADXL362 a, edu.wpi.first.wpilibj.ADXRS450_Gyro g)
a
- The Accelerometer.g
- The Gyroscope.public double getAngle()
public double getGyroRate()
public double getAcceleration(edu.wpi.first.wpilibj.ADXL362.Axes axis)
axis
- The axis who's acceleration you're getting.public edu.wpi.first.wpilibj.ADXL362.AllAxes getAccelerations()
public double getX()
public double getY()
public double getZ()
public void setAccelerometerRange(edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range)
range
- The new range of the Accelerometer.public double getForPID()
PIDSource