3dphotoshoot

diff src/android/sensordef.h @ 24:2712c5da2e00

getting sensor input (hack)
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 16 Jun 2015 06:17:59 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/android/sensordef.h	Tue Jun 16 06:17:59 2015 +0300
     1.3 @@ -0,0 +1,47 @@
     1.4 +#ifndef SENSORDEF_H_
     1.5 +#define SENSORDEF_H_
     1.6 +
     1.7 +#include <android/sensor.h>
     1.8 +
     1.9 +/* the sensor.h header file in NDK 10d is missing a lot of sensor types,
    1.10 + * here is the full list.
    1.11 + */
    1.12 +#define SENSOR_TYPE_ACCELEROMETER			1
    1.13 +#define SENSOR_TYPE_MAGNETIC_FIELD			2
    1.14 +#define SENSOR_TYPE_ORIENTATION				3
    1.15 +#define SENSOR_TYPE_GYROSCOPE				4
    1.16 +#define SENSOR_TYPE_LIGHT					5
    1.17 +#define SENSOR_TYPE_PRESSURE				6
    1.18 +#define SENSOR_TYPE_TEMPERATURE				7
    1.19 +#define SENSOR_TYPE_PROXIMITY				8
    1.20 +#define SENSOR_TYPE_GRAVITY					9
    1.21 +#define SENSOR_TYPE_LINEAR_ACCELERATION		10
    1.22 +#define SENSOR_TYPE_ROTATION_VECTOR			11
    1.23 +#define SENSOR_TYPE_RELATIVE_HUMIDITY		12
    1.24 +#define SENSOR_TYPE_AMBIENT_TEMPERATURE		13
    1.25 +#define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED	14
    1.26 +#define SENSOR_TYPE_GAME_ROTATION_VECTOR	15
    1.27 +#define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED	16
    1.28 +#define SENSOR_TYPE_SIGNIFICANT_MOTION		17
    1.29 +#define SENSOR_TYPE_STEP_DETECTOR			18
    1.30 +#define SENSOR_TYPE_STEP_COUNTER			19
    1.31 +#define SENSOR_TYPE_GEOMAGNETIC_ROTATION	20
    1.32 +#define SENSOR_TYPE_HEART_RATE				21
    1.33 +#define SENSOR_TYPE_TILT_DETECTOR			22
    1.34 +#define SENSOR_TYPE_WAKE_GESTURE			23
    1.35 +#define SENSOR_TYPE_GLANCE_GESTURE			24
    1.36 +#define SENSOR_TYPE_PICK_UP_GESTURE			25
    1.37 +#define SENSOR_TYPE_WRIST_TILT_GESTURE		26
    1.38 +
    1.39 +#ifdef __cplusplus
    1.40 +extern "C" {
    1.41 +#endif
    1.42 +
    1.43 +const char *sensor_typestr(int type);
    1.44 +
    1.45 +#ifdef __cplusplus
    1.46 +}
    1.47 +#endif
    1.48 +
    1.49 +
    1.50 +#endif	/* SENSORDEF_H_ */