From: Eunyoung Lee Date: Fri, 3 Nov 2017 08:49:06 +0000 (+0900) Subject: Add log to print sensed value X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F158828%2F1;p=apps%2Fnative%2Fposition-finder-server.git Add log to print sensed value Change-Id: I83a64359d68292de09bbecbf5fce36fa29582965 --- 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 /**