Updating test automation files to support Gaming RV 54/35754/5
authorRamasamy <ram.kannan@samsung.com>
Thu, 26 Feb 2015 07:07:38 +0000 (12:37 +0530)
committerRamasamy <ram.kannan@samsung.com>
Thu, 26 Feb 2015 07:07:43 +0000 (12:37 +0530)
Updating auto_test and tc-common test automation files to support
Gaming RV virtual sensor

Change-Id: Ib8466cbe6683a1bb2eba3ec602d7892f5b80ad35

test/src/auto_test.c
test/src/tc-common.c

index dfe322f..971b171 100644 (file)
@@ -229,6 +229,9 @@ int main(int argc, char **argv)
        result = check_sensor_api(GEOMAGNETIC_RV_RAW_DATA_EVENT, interval);
        fprintf(fp, "Geomagnetic Rotation Vector - RAW_DATA_REPORT_ON_TIME - %d\n", result);
 
+       result = check_sensor_api(GAMING_RV_RAW_DATA_EVENT, interval);
+       fprintf(fp, "Gaming Rotation Vector - RAW_DATA_REPORT_ON_TIME - %d\n", result);
+
        result = check_sensor_api(TEMPERATURE_RAW_DATA_EVENT, interval);
        fprintf(fp, "Temperature - RAW_DATA_REPORT_ON_TIME - %d\n", result);
 
index edee1ba..2d1f263 100644 (file)
@@ -45,6 +45,7 @@ void usage()
        printf("[linear_accel] ");
        printf("[rotation_vector] ");
        printf("[geomagnetic_rv] ");
+       printf("[gaming_rv] ");
        printf("[light]\n");
        printf("event:");
        printf("[RAW_DATA_REPORT_ON_TIME]\n");
@@ -109,6 +110,10 @@ unsigned int get_event_driven(sensor_type_t sensor_type, char str[])
                if (strcmp(str, "RAW_DATA_REPORT_ON_TIME") == 0)
                        return GEOMAGNETIC_RV_RAW_DATA_EVENT;
                break;
+       case GAMING_RV_SENSOR:
+               if (strcmp(str, "RAW_DATA_REPORT_ON_TIME") == 0)
+                       return GAMING_RV_RAW_DATA_EVENT;
+               break;
        default:
                return -1;
        }
@@ -155,6 +160,9 @@ void callback(sensor_t sensor, unsigned int event_type, sensor_data_t *data, voi
        case GEOMAGNETIC_RV_SENSOR:
                printf("Geomagnetic RV [%lld] [%6.6f] [%6.6f] [%6.6f] [%6.6f]\n\n", data->timestamp, data->values[0], data->values[1], data->values[2], data->values[3]);
                break;
+       case GAMING_RV_SENSOR:
+               printf("Gaming RV [%lld] [%6.6f] [%6.6f] [%6.6f] [%6.6f]\n\n", data->timestamp, data->values[0], data->values[1], data->values[2], data->values[3]);
+               break;
        default:
                return;
        }
@@ -215,6 +223,10 @@ int main(int argc, char **argv)
                 sensor_type = GEOMAGNETIC_RV_SENSOR;
                 event = GEOMAGNETIC_RV_RAW_DATA_EVENT;
        }
+       else if (strcmp(argv[1], "gaming_rv") == 0) {
+                sensor_type = GAMING_RV_SENSOR;
+                event = GAMING_RV_RAW_DATA_EVENT;
+       }
        else if (strcmp(argv[1], "light") == 0) {
                 sensor_type = LIGHT_SENSOR;
                 event = LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME;