From a327fcd9384982ce3bf93c2b0bd5a320782b6462 Mon Sep 17 00:00:00 2001 From: Eunyoung Lee Date: Fri, 3 Nov 2017 17:49:06 +0900 Subject: [PATCH] Add log to print sensed value Change-Id: I83a64359d68292de09bbecbf5fce36fa29582965 --- src/controller.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/controller.c b/src/controller.c index 98679d1..46c7d0b 100644 --- a/src/controller.c +++ b/src/controller.c @@ -44,17 +44,16 @@ static Eina_Bool _control_sensors_cb(void *data) #if 0 ret = resource_read_infrared_motion_sensor(PIN_NUMBER, &value); - if (ret != 0) { - _E("Cannot read sensor value"); - } + if (ret != 0) _E("Cannot read sensor value"); + + _D("Detected value : %d", value); #endif #if 0 ret = connectivity_notify_int(ad->resource_info, KEY, value); - if (ret != 0) { - _E("Cannot notify value"); - } + if (ret != 0) _E("Cannot notify value"); #endif + return ECORE_CALLBACK_RENEW; } @@ -71,12 +70,12 @@ static bool service_app_create(void *data) #if 0 ret = connectivity_set_connectivity_type(CONNECTIVITY_TYPE); - if (ret == -1) _E("Cannot set connectivity type"); + if (ret != 0) _E("Cannot set connectivity type"); #endif #if 0 ret = connectivity_set_resource("/door/0", "org.tizen.door", &ad->resource_info); - if (ret == -1) _E("Cannot set connectivity resource"); + if (ret != 0) _E("Cannot set connectivity resource"); #endif /** -- 2.7.4