From 1777765d033aa5853cec24c0d621b8e82ae262e0 Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Thu, 14 Sep 2017 14:45:33 +0900 Subject: [PATCH] sensorctl: fix bug which senosr type was not set Change-Id: Ie441084d2b95f0ea99c70ca0c70b6a2d0b5ba50b Signed-off-by: kibak.yoon --- src/sensorctl/tester_manual.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sensorctl/tester_manual.cpp b/src/sensorctl/tester_manual.cpp index f2270eb..2e40851 100644 --- a/src/sensorctl/tester_manual.cpp +++ b/src/sensorctl/tester_manual.cpp @@ -32,7 +32,7 @@ #define TEST_MANUAL "manual" -static sensor_type_t type; +static sensor_type_t stype; static int interval; static int latency; static int powersave; @@ -61,6 +61,7 @@ tester_manual::~tester_manual() bool tester_manual::setup(sensor_type_t type, int argc, char *argv[]) { + stype = type; interval = TEST_DEFAULT_INTERVAL; latency = TEST_DEFAULT_LATENCY; powersave = TEST_DEFAULT_POWERSAVE_OPTION; @@ -127,18 +128,18 @@ TESTCASE(manual_test, sensor) int index = 0; sensor_data_t data; - if (sensor_adapter::get_count(type) > 1) { + if (sensor_adapter::get_count(stype) > 1) { _N("There are more than 2 sensors. please enter the index : "); if (scanf("%d", &index) != 1) return false; } - sensor_info info(type, index, interval, latency, powersave, test_cb, NULL); + sensor_info info(stype, index, interval, latency, powersave, test_cb, NULL); ret = sensor_adapter::start(info, handle); ASSERT_TRUE(ret); - ret = sensor_adapter::get_data(handle, type, data); + ret = sensor_adapter::get_data(handle, stype, data); EXPECT_TRUE(ret); mainloop::run(); -- 2.7.4