FEATURE ANDROID ORIENTATION

By surpredator , 12 November 2015

Hi,
DMP_FEATURE_ANDROID_ORIENT allows 4 possibilities defined in:
inv_mpu_dmp_motion_driver.h
#define ANDROID_ORIENT_PORTRAIT (0x00)
#define ANDROID_ORIENT_LANDSCAPE (0x01)
#define ANDROID_ORIENT_REVERSE_PORTRAIT (0x02)
#define ANDROID_ORIENT_REVERSE_LANDSCAPE (0x03)

I need all 6 possibilities like detecting 6 sides of a cube.
Is there a possibility to get 6 orinetation ? How can i do to modify the code (adding mask) to get all 6 sides?
Thanks in advance.

I use motion_driver-5.1.3
Gesture are decoded inside inv_mpu_dmp_motion_driver.c

static int decode_gesture(unsigned char *gesture)
{
unsigned char tap, android_orient;

android_orient = gesture[3] & 0xC0;
[...]
if (gesture[1] & INT_SRC_ANDROID_ORIENT) {
if (dmp.android_orient_cb)
dmp.android_orient_cb(android_orient >> 6);
}

return 0;
}

phpbb Topic ID
31041