summaryrefslogtreecommitdiff
path: root/src/controller.c
diff options
context:
space:
mode:
authorJin Yoon <jinny.yoon@samsung.com>2017-07-17 10:20:13 +0900
committerJin Yoon <jinny.yoon@samsung.com>2017-07-17 10:20:13 +0900
commit279e3d4aa96459a83ef28909e6a05ac0023c8cfd (patch)
tree5bf04dcbc2ae969cb5f629870c9a00c79f740367 /src/controller.c
parent5d9840174c3339455de0906c8e136e6ed8c528e0 (diff)
downloadrcc-279e3d4aa96459a83ef28909e6a05ac0023c8cfd.tar.gz
rcc-279e3d4aa96459a83ef28909e6a05ac0023c8cfd.tar.bz2
rcc-279e3d4aa96459a83ef28909e6a05ac0023c8cfd.zip
Activate connectivity's notification of sensoring data
Change-Id: Icf999e52e7eb2391fffd8d48ec24e4b497a8a0f4
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c
index cfb109a..d551c30 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -55,18 +55,19 @@ static Eina_Bool _infrared_motion_getter_timer(void *data)
int gpio_num[3] = { 16, 23, 26 };
int i = 0;
int value[3] = { 0, };
+ int detected = 0;
+ app_data *ad = data;
for (i = 0; i < 3; i++) {
if (resource_read_infrared_motion_sensor(gpio_num[i], &value[i]) == -1) {
_E("Failed to get Infrared Motion value [GPIO:%d]", gpio_num[i]);
continue;
}
- _I("[GPIO:%d] Infrared Motion Value is [%d]", gpio_num[i], value[i]);
+ detected |= value[i];
}
-
- //@TODO: Send the data to Analyzer using connectivity APIs
-
+ if (connectivity_notify(ad->resource_info, detected) == -1)
+ _E("Cannot notify message");
#else
int value = 0;