Accelerometer. More...
#import <mo_accel.h>
Static Public Member Functions | |
(static void) | + setUpdateInterval |
set the global update interval | |
(static double) | + getUpdateInterval |
get the global update interval | |
(static void) | + getXYZ |
returns current (x,y,z) values (for polling) | |
(static double) | + getX |
returns current (x) value (for polling) | |
(static double) | + getY |
returns current (y) value (for polling) | |
(static double) | + getZ |
returns current (z) value (for polling) | |
(static void) | + addCallback |
register a callback to be invoked on subsequent updates | |
(static void) | + removeCallback |
unregister a callback | |
(static void) | + update |
Internal/Do Not Use. | |
Static Public Attributes | |
static const double | MAX_ACCEL_RATE = .01 |
maximum accelerometer rate |
Accelerometer.
Implement a MoAccelCallback function and add the callback to start processing accelerometer data.
Sample Code:
MoAccel::addCallback( accelCallback, NULL );
+ (void) addCallback | (const MoAccelCallback &) | callback | ||
(void *) | data | |||
register a callback to be invoked on subsequent updates
+ (double) getUpdateInterval |
get the global update interval
+ (double) getX |
returns current (x) value (for polling)
+ (void) getXYZ | (double &) | px | ||
(double &) | py | |||
(double &) | pz | |||
returns current (x,y,z) values (for polling)
+ (double) getY |
returns current (y) value (for polling)
+ (double) getZ |
returns current (z) value (for polling)
+ (void) removeCallback | (const MoAccelCallback &) | callback |
unregister a callback
+ (void) setUpdateInterval | (double) | seconds |
set the global update interval
+ (void) update | (double) | x | ||
(double) | y | |||
(double) | z | |||
Internal/Do Not Use.
+ (const double) MAX_ACCEL_RATE = .01 [static] |
maximum accelerometer rate