sensors: removed adjust value for accel & gyro
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Tue, 15 Jul 2014 14:06:02 +0000 (23:06 +0900)
committerJinhyung Choi <jinhyung2.choi@samsung.com>
Tue, 15 Jul 2014 14:06:02 +0000 (23:06 +0900)
These adjust values are moved into the client(ECP)

Change-Id: If52471965856c7409debeacc190575491c654343
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
tizen/src/ecs/ecs_sensor.c
tizen/src/skin/maruskin_operation.c

index 3b5c9ed9b66de8d016afea1773850b80073439f9..a69ea19f34b72ddc16146e88f3bfc8f1761cddce 100644 (file)
@@ -46,11 +46,8 @@ MULTI_DEBUG_CHANNEL(qemu, ecs);
 #define TEMP_BUF_SIZE   255
 #define MAX_VAL_LENGTH  40
 
-#define ACCEL_ADJUST    100000
 #define ACCEL_MAX       1961330
 
-#define GYRO_ADJUST     17.50
-
 static int parse_val(const char *buff, unsigned char data, char *parsbuf)
 {
     int count=0;
@@ -85,7 +82,7 @@ static int get_parse_val (const char* buf, char* tmp)
 
 int accel_min_max(double value)
 {
-    int result = (int)(value * ACCEL_ADJUST);
+    int result = (int)value;
 
     if (result > ACCEL_MAX)
         result = ACCEL_MAX;
@@ -180,15 +177,15 @@ static void _req_set_sensor_gyro(int len, const char* data)
 
     // x
     len += get_parse_val(data + len, tmp);
-    x = (int)(atoi(tmp) / GYRO_ADJUST);
+    x = (int)atoi(tmp);
 
     // y
     len += get_parse_val(data + len, tmp);
-    y = (int)(atoi(tmp) / GYRO_ADJUST);
+    y = (int)atoi(tmp);
 
     // z
     len += get_parse_val(data + len, tmp);
-    z = (int)(atoi(tmp) / GYRO_ADJUST);
+    z = (int)atoi(tmp);
 
     memset(tmp, 0, TEMP_BUF_SIZE);
 
index 9a3520513de6a6c5abfca872091223f45bff3d58..b2d5942e7b0a6bf2e0db0ec9e1f04af5e4d601c7 100644 (file)
@@ -353,21 +353,21 @@ void do_rotation_event(int rotation_type)
     switch (rotation_type) {
         case ROTATION_PORTRAIT:
             x = 100;
-            y = accel_min_max(9.80665);
+            y = accel_min_max(980665);
             z = 100;
             break;
         case ROTATION_LANDSCAPE:
-            x = accel_min_max(9.80665);
+            x = accel_min_max(980665);
             y = 100;
             z = 100;
             break;
         case ROTATION_REVERSE_PORTRAIT:
             x = 100;
-            y = accel_min_max(-9.80665);
+            y = accel_min_max(-980665);
             z = 100;
             break;
         case ROTATION_REVERSE_LANDSCAPE:
-            x = accel_min_max(-9.80665);
+            x = accel_min_max(-980665);
             y = 100;
             z = 100;
             break;