public class HiTechnicNxtAccelerationSensor extends I2cControllerPortDeviceImpl implements AccelerationSensor, I2cController.I2cPortReadyCallback
HardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
static int |
ACCEL_LENGTH |
static int |
ADDRESS_ACCEL_START |
static I2cAddr |
I2C_ADDRESS |
controller, physicalPort| Constructor and Description |
|---|
HiTechnicNxtAccelerationSensor(I2cController module,
int physicalPort) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this device
|
protected void |
controllerNowArmedOrPretending()
intended as a subclass hook
|
Acceleration |
getAcceleration()
Acceleration, measured in g's
|
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
int |
getVersion()
Version
|
void |
portIsReady(int port) |
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
java.lang.String |
status()
Status of this sensor, in string form
|
java.lang.String |
toString() |
controllerNowDisarmed, finishConstruction, getI2cController, getPort, onModuleStateChangepublic static final I2cAddr I2C_ADDRESS
public static final int ADDRESS_ACCEL_START
public static final int ACCEL_LENGTH
public HiTechnicNxtAccelerationSensor(I2cController module, int physicalPort)
protected void controllerNowArmedOrPretending()
I2cControllerPortDeviceImplcontrollerNowArmedOrPretending in class I2cControllerPortDeviceImplpublic java.lang.String toString()
toString in class java.lang.Objectpublic Acceleration getAcceleration()
AccelerationSensorgetAcceleration in interface AccelerationSensorpublic java.lang.String status()
AccelerationSensorstatus in interface AccelerationSensorpublic void portIsReady(int port)
portIsReady in interface I2cController.I2cPortReadyCallbackpublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicepublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic void close()
HardwareDeviceclose in interface HardwareDevice