@I2cDeviceType @DeviceProperties(name="@string/navx_micro_name", description="@string/navx_micro_description", xmlTag="KauaiLabsNavxMicro", builtIn=true) public class NavxMicroNavigationSensor extends I2cDeviceSynchDeviceWithParameters<I2cDeviceSynch,NavxMicroNavigationSensor.Parameters> implements Gyroscope, IntegratingGyroscope, I2cAddrConfig
NavxMicroNavigationSensor provides support for the Kauai Labs navX-Micro Robotics
Navigation Sensor. This sensor contains an Invensense MPU-9250 integrated circuit.| Modifier and Type | Class and Description |
|---|---|
static class |
NavxMicroNavigationSensor.CalibrationStatus |
static class |
NavxMicroNavigationSensor.IntegrationControl |
static class |
NavxMicroNavigationSensor.OpStatus |
static class |
NavxMicroNavigationSensor.Parameters |
static class |
NavxMicroNavigationSensor.Register |
static class |
NavxMicroNavigationSensor.SelfTestStatus |
static class |
NavxMicroNavigationSensor.SensorStatus |
HardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
static I2cAddr |
ADDRESS_I2C_DEFAULT |
protected float |
gyroScaleFactor |
protected static I2cDeviceSynch.ReadWindow |
lowerWindow |
int |
NAVX_WRITE_COMMAND_BIT |
protected static I2cDeviceSynch.ReadMode |
readMode |
protected static I2cDeviceSynch.ReadWindow |
upperWindow |
parametersdeviceClient, deviceClientIsOwned, isInitialized| Constructor and Description |
|---|
NavxMicroNavigationSensor(I2cDeviceSynch deviceClient) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureReadWindow(I2cDeviceSynch.ReadWindow needed) |
Orientation |
getAngularOrientation(AxesReference reference,
AxesOrder order,
AngleUnit angleUnit)
Returns the absolute orientation of the sensor as a set three angles.
|
java.util.Set<Axis> |
getAngularOrientationAxes()
Returns the axes on which the sensor measures angular orientation.
|
AngularVelocity |
getAngularVelocity(AngleUnit unit)
Returns the angular rotation rate across all the axes measured by the gyro.
|
java.util.Set<Axis> |
getAngularVelocityAxes()
Returns the axes on which the gyroscope measures angular velocity.
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
RobotUsbDevice.FirmwareVersion |
getFirmwareVersion() |
I2cAddr |
getI2cAddress()
Returns the I2C address currently in use to communicate with an I2C hardware device
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
protected boolean |
internalInitialize(NavxMicroNavigationSensor.Parameters parameters)
Actually attempts to carry out initialization with the indicated parameter block.
|
boolean |
isCalibrating()
Returns true if the sensor is currently performing automatic gyro/accelerometer calibration.
|
protected static I2cDeviceSynch.ReadWindow |
newWindow(NavxMicroNavigationSensor.Register regFirst,
NavxMicroNavigationSensor.Register regMax) |
byte |
read8(NavxMicroNavigationSensor.Register reg) |
short |
readShort(NavxMicroNavigationSensor.Register reg) |
float |
readSignedHundredthsFloat(NavxMicroNavigationSensor.Register reg) |
TimestampedData |
readTimeStamped(NavxMicroNavigationSensor.Register reg,
int creg) |
void |
setI2cAddress(I2cAddr newAddress)
Configures a new I2C address to use
|
protected void |
setReadWindow() |
protected float |
shortToSignedHundredths(short value) |
void |
write8(NavxMicroNavigationSensor.Register reg,
byte value) |
void |
writeShort(NavxMicroNavigationSensor.Register reg,
short value) |
doInitialize, getParameters, initializeclose, disengage, engage, getConnectionInfo, getDeviceClient, getVersion, initialize, initializeIfNecessary, onModuleStateChange, registerArmingStateCallback, resetDeviceConfigurationForOpModepublic final int NAVX_WRITE_COMMAND_BIT
protected static final I2cDeviceSynch.ReadMode readMode
protected static final I2cDeviceSynch.ReadWindow lowerWindow
protected static final I2cDeviceSynch.ReadWindow upperWindow
protected float gyroScaleFactor
public static final I2cAddr ADDRESS_I2C_DEFAULT
public NavxMicroNavigationSensor(I2cDeviceSynch deviceClient)
protected static I2cDeviceSynch.ReadWindow newWindow(NavxMicroNavigationSensor.Register regFirst, NavxMicroNavigationSensor.Register regMax)
protected void setReadWindow()
protected boolean internalInitialize(NavxMicroNavigationSensor.Parameters parameters)
I2cDeviceSynchDeviceWithParametersI2cDeviceSynchDeviceWithParameters.parameters
member variable.internalInitialize in class I2cDeviceSynchDeviceWithParameters<I2cDeviceSynch,NavxMicroNavigationSensor.Parameters>parameters - the parameter block with which to initializepublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicepublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic RobotUsbDevice.FirmwareVersion getFirmwareVersion()
protected void ensureReadWindow(I2cDeviceSynch.ReadWindow needed)
public TimestampedData readTimeStamped(NavxMicroNavigationSensor.Register reg, int creg)
public byte read8(NavxMicroNavigationSensor.Register reg)
public short readShort(NavxMicroNavigationSensor.Register reg)
public float readSignedHundredthsFloat(NavxMicroNavigationSensor.Register reg)
protected float shortToSignedHundredths(short value)
public void write8(NavxMicroNavigationSensor.Register reg, byte value)
public void writeShort(NavxMicroNavigationSensor.Register reg, short value)
public boolean isCalibrating()
NOTE: During this automatic calibration, the angular orientation data may not be accurate.
public java.util.Set<Axis> getAngularVelocityAxes()
GyroscopeGyroscope.getAngularVelocity(AngleUnit).getAngularVelocityAxes in interface GyroscopeGyroscope.getAngularVelocity(AngleUnit)public java.util.Set<Axis> getAngularOrientationAxes()
OrientationSensorgetAngularOrientationAxes in interface OrientationSensorpublic Orientation getAngularOrientation(AxesReference reference, AxesOrder order, AngleUnit angleUnit)
OrientationSensorgetAngularOrientation in interface OrientationSensorreference - the axes reference in which the result will be expressedorder - the axes order in which the result will be expressedangleUnit - the angle units in which the result will be expressedOrientationpublic AngularVelocity getAngularVelocity(AngleUnit unit)
GyroscopegetAngularVelocity in interface Gyroscopeunit - the unit in which the rotation rates are to be returned (the time
dimension is always inverse-seconds).Gyroscope.getAngularVelocityAxes()public void setI2cAddress(I2cAddr newAddress)
I2cAddrConfigsetI2cAddress in interface I2cAddrConfignewAddress - the new I2C address to usepublic I2cAddr getI2cAddress()
I2cAddressableDevicegetI2cAddress in interface I2cAddressableDevice