public abstract static class Accelerometer.Callbacks extends java.lang.Object implements MetaWearController.ModuleCallbacks
Constructor and Description |
---|
Accelerometer.Callbacks() |
Modifier and Type | Method and Description |
---|---|
void |
doubleTapDetected(Accelerometer.MovementData moveData)
Called when a double tap has been detected
|
Module |
getModule()
Get the module the notification represents
|
void |
inFreeFall()
Deprecated.
As of v1.1, replaced by
movementDetected(Accelerometer.MovementData) |
void |
movementDetected(Accelerometer.MovementData moveData)
Called when movement is detected.
|
void |
orientationChanged(Accelerometer.Orientation accelOrientation)
Called when the orientation has changed
|
void |
receivedConfiguration(Accelerometer.Component component,
byte[] configuration)
Called when the configuration of an accelerometer component has been received
|
void |
receivedDataValue(short x,
short y,
short z)
Called when the ble radio has received accelerometer motion data.
|
void |
receivedOrientation(byte orientation)
Deprecated.
As of v1.1, replaced by
orientationChanged(Accelerometer.Orientation) |
void |
shakeDetected(Accelerometer.MovementData moveData)
Called when a shake motion is detected.
|
void |
singleTapDetected(Accelerometer.MovementData moveData)
Called when a single tap has been detected
|
void |
stoppedFreeFall()
Deprecated.
As of v1.1, callback function was never properly implemented and
has been replaced by
movementDetected(Accelerometer.MovementData) |
public final Module getModule()
MetaWearController.ModuleCallbacks
getModule
in interface MetaWearController.ModuleCallbacks
Module
public void receivedConfiguration(Accelerometer.Component component, byte[] configuration)
component
- Component the configuration is describingconfiguration
- Byte representation of the configurationpublic void receivedDataValue(short x, short y, short z)
BytesInterpreter.bytesToGs(byte[], short)
x
- X component of acceleration, in milli Gsy
- Y component of acceleration, in milli Gsz
- Z component of acceleration, in milli Gspublic void movementDetected(Accelerometer.MovementData moveData)
moveData
- Movement data encapsulated in an object@Deprecated public void inFreeFall()
movementDetected(Accelerometer.MovementData)
@Deprecated public void stoppedFreeFall()
movementDetected(Accelerometer.MovementData)
@Deprecated public void receivedOrientation(byte orientation)
orientationChanged(Accelerometer.Orientation)
orientation
- Orientation information from the accelerometer's status registerpublic void orientationChanged(Accelerometer.Orientation accelOrientation)
accelOrientation
- Orientation of the accelerometerpublic void singleTapDetected(Accelerometer.MovementData moveData)
moveData
- Movement data encapsulated in an objectpublic void doubleTapDetected(Accelerometer.MovementData moveData)
moveData
- Movement data encapsulated in an objectpublic void shakeDetected(Accelerometer.MovementData moveData)
moveData
- Movement data encapsulated in an object