SENSOR: bug fixed to set gyroscope & light 76/19576/2
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Wed, 16 Apr 2014 02:46:02 +0000 (11:46 +0900)
committerJinhyung Choi <jinhyung2.choi@samsung.com>
Wed, 16 Apr 2014 02:48:39 +0000 (11:48 +0900)
Change-Id: I6549f8432ad6b0c7aac80de6120555fce9d2a2df
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
tizen/src/hw/maru_virtio_sensor.c
tizen/src/hw/maru_virtio_sensor.h

index a700b61..3942a11 100644 (file)
@@ -149,6 +149,9 @@ static void __set_sensor_data (enum sensor_types type, char* data, int len)
         case sensor_type_gyro_z:
             sscanf(data, "%d", &gyro_z_raw);
             break;
+        case sensor_type_gyro:
+            sscanf(data, "%d %d %d", &gyro_x_raw, &gyro_y_raw, &gyro_z_raw);
+            break;
         case sensor_type_light_adc:
             sscanf(data, "%d", &light_adc);
             light_level = (light_adc / 6554) % 10 + 1;
index fef5bf4..2370c6e 100644 (file)
@@ -123,7 +123,7 @@ void req_sensor_data(enum sensor_types type, enum request_cmd req, char* data, i
     req_sensor_data(sensor_type_proxi, request_set, data, len);
 
 #define set_sensor_light(data, len) \
-    req_sensor_data(sensor_type_light, request_set, data, len);
+    req_sensor_data(sensor_type_light_adc, request_set, data, len);
 
 #define set_sensor_gyro(data, len)  \
     req_sensor_data(sensor_type_gyro, request_set, data, len);