语言

Menu
Sites
Language
sensor-info.h

Can someone tell me what the enum values mean?

 

  1. typedef enum {
  2. SENSOR_UNIT_METRE_PER_SECOND_SQUARED,
  3. SENSOR_UNIT_MICRO_TESLA,
  4. SENSOR_UNIT_DEGREE,
  5. SENSOR_UNIT_LUX,
  6. SENSOR_UNIT_CENTIMETER,
  7. SENSOR_UNIT_DEGREE_PER_SECOND,
  8. SENSOR_UNIT_MAX
  9. } sensor_unit_e;

I'm considering writing an app that runs on the gear using the accelerometer but I need more than per second resolution for this to work...  The action is around 3 seconds total but I need a lot more samples than 3.

响应

1 回复
Mehedi Alamgir

Hello!

The type defined here describes measurement units for available sensors. For example:
SENSOR_UNIT_METRE_PER_SECOND_SQUARED for Accelerometer, Gravity.
SENSOR_UNIT_MICRO_TESLA  for Magnetic Field and more. 
You can find usage of those units here:  https://developer.tizen.org/ko/development/sample/native/System/Sensor/src/model/sensor-list.c


And, If you want to modify the interval time at which data is delivered from a sensor event, There is a callback function named  “sensor_listener_set_event_cb”. You can change interval time here. Invoke this function with desired interval time (10ms-1000ms, default 100ms). 

Reference: https://developer.tizen.org/dev-guide/native/2.3.0/org.tizen.mobile.native.apireference/group__CAPI__SYSTEM__SENSOR__MODULE.html#ga65d4f2ef13e836432c3197a62c2767ed

Thank you.