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, onModuleStateChange
public 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()
I2cControllerPortDeviceImpl
controllerNowArmedOrPretending
in class I2cControllerPortDeviceImpl
public java.lang.String toString()
toString
in class java.lang.Object
public Acceleration getAcceleration()
AccelerationSensor
getAcceleration
in interface AccelerationSensor
public java.lang.String status()
AccelerationSensor
status
in interface AccelerationSensor
public void portIsReady(int port)
portIsReady
in interface I2cController.I2cPortReadyCallback
public HardwareDevice.Manufacturer getManufacturer()
HardwareDevice
getManufacturer
in interface HardwareDevice
public java.lang.String getDeviceName()
HardwareDevice
getDeviceName
in interface HardwareDevice
public java.lang.String getConnectionInfo()
HardwareDevice
getConnectionInfo
in interface HardwareDevice
public int getVersion()
HardwareDevice
getVersion
in interface HardwareDevice
public void resetDeviceConfigurationForOpMode()
HardwareDevice
resetDeviceConfigurationForOpMode
in interface HardwareDevice
public void close()
HardwareDevice
close
in interface HardwareDevice