3dphotoshoot

view src/android/sensordef.c @ 25:ac80210d5fbe

preparing a pc version for easier development of non-android-specifics
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 18 Jun 2015 03:12:30 +0300
parents
children
line source
1 #include "sensordef.h"
3 static const char *names[] = {
4 "unknown",
5 "accelerometer",
6 "magnetic field",
7 "orientation",
8 "gyroscope",
9 "light",
10 "pressure",
11 "temperature",
12 "proximity",
13 "gravity",
14 "linear acceleration",
15 "rotation vector",
16 "relative humidity",
17 "ambient temperature",
18 "magnetic field (uncalibrated)",
19 "game rotation vector",
20 "gyroscope (uncalibrated)",
21 "significant motion",
22 "step detector",
23 "step counter",
24 "geomagnetic rotation",
25 "heart rate",
26 "tilt detector",
27 "wake gesture",
28 "glance gesture",
29 "pick up gesture",
30 "wrist tilt gesture"
31 };
33 #define NUM_SENSOR_TYPES (sizeof names / sizeof *names)
35 const char *sensor_typestr(int type)
36 {
37 if(type < 0 || type >= NUM_SENSOR_TYPES) {
38 type = 0;
39 }
40 return names[type];
41 }