result = check_sensor_api(ORIENTATION_RAW_DATA_EVENT, interval);
fprintf(fp, "Orientation - RAW_DATA_REPORT_ON_TIME - %d\n", result);
+ result = check_sensor_api(TILT_RAW_DATA_EVENT, interval);
+ fprintf(fp, "Tilt - RAW_DATA_REPORT_ON_TIME - %d\n", result);
+
result = check_sensor_api(PRESSURE_RAW_DATA_EVENT, interval);
fprintf(fp, "Pressure - RAW_DATA_REPORT_ON_TIME - %d\n", result);
case(ORIENTATION_SENSOR):
printf("Orientation [%lld] [%6.6f] [%6.6f] [%6.6f]\n\n", data.timestamp, data.values[0], data.values[1], data.values[2]);
break;
+ case(TILT_SENSOR):
+ printf("Tilt [%lld] [%6.6f] [%6.6f]\n\n", data.timestamp, data.values[0], data.values[1]);
+ break;
case(GRAVITY_SENSOR):
printf("Gravity [%lld] [%6.6f] [%6.6f] [%6.6f]\n\n", data.timestamp, data.values[0], data.values[1], data.values[2]);
break;
if (strcmp(str, "RAW_DATA_EVENT") == 0)
return ORIENTATION_RAW_DATA_EVENT;
break;
+ case TILT_SENSOR:
+ if (strcmp(str, "RAW_DATA_EVENT") == 0)
+ return TILT_RAW_DATA_EVENT;
+ break;
case GRAVITY_SENSOR:
if (strcmp(str, "RAW_DATA_EVENT") == 0)
return GRAVITY_RAW_DATA_EVENT;
case ORIENTATION_SENSOR :
printf("Orientation [%lld] [%6.6f] [%6.6f] [%6.6f]\n", data->timestamp, data->values[0], data->values[1], data->values[2]);
break;
+ case TILT_SENSOR :
+ printf("Tilt [%lld] [%6.6f] [%6.6f]\n", data->timestamp, data->values[0], data->values[1]);
+ break;
case GRAVITY_SENSOR:
printf("Gravity [%lld] [%6.6f] [%6.6f] [%6.6f]\n", data->timestamp, data->values[0], data->values[1], data->values[2]);
break;
printf("[temperature] ");
printf("[geomagnetic] ");
printf("[orientation] ");
+ printf("[tilt] ");
printf("[gravity] ");
printf("[linear_accel] ");
printf("[rotation_vector] ");
sensor_type = ORIENTATION_SENSOR;
event = ORIENTATION_RAW_DATA_EVENT;
}
+ else if (strcmp(argv[1], "tilt") == 0) {
+ sensor_type = TILT_SENSOR;
+ event = TILT_RAW_DATA_EVENT;
+ }
else if (strcmp(argv[1], "gravity") == 0) {
sensor_type = GRAVITY_SENSOR;
event = GRAVITY_RAW_DATA_EVENT;