summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Yoon <jinny.yoon@samsung.com>2017-07-20 14:51:31 +0900
committerJin Yoon <jinny.yoon@samsung.com>2017-07-20 14:51:31 +0900
commitbe85ac3d9625e9db9fbcf0ca0785cdc1684a804f (patch)
tree3a6df4c52930c646257ddb254b39ad375a54f550
parent1e606b03bc8592c827a9d7895ae76096173ce3e8 (diff)
downloadposition-finder-server-be85ac3d9625e9db9fbcf0ca0785cdc1684a804f.tar.gz
position-finder-server-be85ac3d9625e9db9fbcf0ca0785cdc1684a804f.tar.bz2
position-finder-server-be85ac3d9625e9db9fbcf0ca0785cdc1684a804f.zip
Zarie ver. 0.1 : Auto-start on boot
Change-Id: Iab5cb025a39974f1bd9534e5642a5337ec956428
-rw-r--r--settings13
-rw-r--r--src/controller.c8
-rw-r--r--tizen-manifest.xml2
3 files changed, 19 insertions, 4 deletions
diff --git a/settings b/settings
new file mode 100644
index 0000000..ceacdbb
--- /dev/null
+++ b/settings
@@ -0,0 +1,13 @@
+[ethernet_b827eb0b6458_cable]
+Name=Wired
+AutoConnect=true
+Modified=2016-07-25T19:49:54.191535Z
+IPv4.method=manual
+IPv6.method=auto
+IPv6.privacy=disabled
+IPv4.DHCP.LastAddress=10.113.216.216
+Nameservers.IPv4method=dhcp
+IPv4.netmask_prefixlen=24
+IPv4.local_address=10.113.62.234
+IPv4.gateway=10.113.62.1
+#connmanctl config ethernet_b827eb0b6458_cable --ipv4 manual 10.113.62.234 255.255.255.0 10.113.62.1
diff --git a/src/controller.c b/src/controller.c
index 2b2754c..886f712 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -40,6 +40,7 @@
#define GPIO_INFRARED_MOTION_NUM_1 4
#define I2C_ILLUMINANCE_FIRST_PIN_1 3
#define USE_MULTIPLE_SENSOR 1
+#define MULTIPLE_SENSOR_NUMBER 5
static void _start_internal_function(void);
static void _stop_internal_function(void);
@@ -52,19 +53,20 @@ typedef struct app_data_s {
static Eina_Bool _infrared_motion_getter_timer(void *data)
{
#if USE_MULTIPLE_SENSOR
- int gpio_num[3] = { 16, 23, 26 };
+ int gpio_num[MULTIPLE_SENSOR_NUMBER] = { 5, 6, 13, 19, 26 };
int i = 0;
- int value[3] = { 0, };
+ int value[MULTIPLE_SENSOR_NUMBER] = { 0, };
int detected = 0;
app_data *ad = data;
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < MULTIPLE_SENSOR_NUMBER; 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;
}
detected |= value[i];
}
+ _I("[5:%d][6:%d][13:%d][19:%d][26:%d]", value[0], value[1], value[2], value[3], value[4]);
if (connectivity_notify(ad->resource_info, detected) == -1)
_E("Cannot notify message");
diff --git a/tizen-manifest.xml b/tizen-manifest.xml
index 1bde27a..2cd9c25 100644
--- a/tizen-manifest.xml
+++ b/tizen-manifest.xml
@@ -5,7 +5,7 @@
<author email="gs86.lee@samsung.com" href="www.samsung.com">Geunsun Lee</author>
<author email="ey928.lee@samsung.com" href="www.samsung.com">Eunyoung Lee</author>
<author email="junkyu.han@samsung.com" href="www.samsung.com">Junkyu Han</author>
- <service-application appid="org.tizen.position-finder-server" auto-restart="false" exec="position-finder-server" multiple="false" nodisplay="true" on-boot="false" taskmanage="false" type="capp">
+ <service-application appid="org.tizen.position-finder-server" auto-restart="true" exec="position-finder-server" multiple="false" nodisplay="true" on-boot="true" taskmanage="false" type="capp">
<label>Position Finder</label>
<icon>position_finder_server.png</icon>
</service-application>