I am interested in getting linear acceleration and gravity data from sensors using Tizen Native on wearable. In my app I have these lines of code to check if I can get these data on the watch:
char buf[PATH_MAX];
bool is_supportedAcc = false;
sensor_is_supported(SENSOR_ACCELEROMETER, &is_supportedAcc);
bool is_supportedGyro = false;
sensor_is_supported(SENSOR_GYROSCOPE, &is_supportedGyro);
bool is_supportedGrav = false;
sensor_is_supported(SENSOR_GRAVITY, &is_supportedGrav);
sprintf(buf, "A|G|T -- %s|%s|%s", is_supportedAcc ? "T" : "F", is_supportedGyro ? "T" : "F", is_supportedGrav ? "T" : "F");
elm_object_text_set(ad->label1, buf);
When I run this code on the emulator I see true for all 3, on the device I see false for gravity, and true for everything else.
Also when I do sdb and run the command below, I can see that different sensors are enabled/disabled in a config file.
sh-3.2$ cat /etc/config/model-config.xml | grep sensor | grep gravity
<key name="tizen.org/feature/sensor.gravity" type="bool">false</key>
Does this mean I can configure the device slightly and make the gravity sensor available to my app?
Is there any way to get the gravity sensor data off the watch — even if it just works on one watch for now?
Also, is there some Tizen code that converts Raw Acceleration (which is the sum of Linear and Gravity) into it’s Linear and Gravity components?
Thanks so much for your help.
Best,
Sumeet Thadani