From 5163f62b00867a45691ac790f691e901f4b45b40 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Wed, 22 Oct 2014 15:32:50 +0900 Subject: [PATCH] Wearable sensor: Add sensor option.(press,uv,hrm) Change-Id: I280978a8d2edb606349dbf221aee359e35ee335c Signed-off-by: minkee.lee --- .../emulator/manager/wearable/vms/Launcher.java | 23 +++++++++++++++++++++- template/w-x86-standard-template.xml | 5 ++++- template/w-x86-standard.xml | 3 +++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/plugin-project/wearable-plugin/src/org/tizen/emulator/manager/wearable/vms/Launcher.java b/plugin-project/wearable-plugin/src/org/tizen/emulator/manager/wearable/vms/Launcher.java index 75a0aff..131f69d 100644 --- a/plugin-project/wearable-plugin/src/org/tizen/emulator/manager/wearable/vms/Launcher.java +++ b/plugin-project/wearable-plugin/src/org/tizen/emulator/manager/wearable/vms/Launcher.java @@ -82,6 +82,9 @@ public class Launcher implements ILauncher { public static final String OPT_LIGHT = "light"; public static final String OPT_PROXI = "proxi"; public static final String OPT_HAPTIC = "haptic"; + public static final String OPT_PRESS = "press"; // pressure + public static final String OPT_UV = "uv"; // ultra violet + public static final String OPT_HRM = "hrm"; // heartbeat rate meter public static Launcher getInstance() { if (launcher == null) { @@ -308,7 +311,7 @@ public class Launcher implements ILauncher { cmd.add("virtio-power-pci"); } - // for sensor (accel, geo, gyro, light, proxi, haptic) + // for sensor (accel, geo, gyro, light, proxi, haptic, pressure, ultra violet, heart rate meter) OptionType sensor = property.getPropertyValue().getAdvancedOption(OPT_SENSOR); if (sensor != null) { cmd.add("-device"); @@ -350,6 +353,24 @@ public class Launcher implements ILauncher { } sb.append("haptic"); } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PRESS))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("press"); + } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_UV))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("uv"); + } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HRM))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("hrm"); + } if (sb.toString().isEmpty()) { cmd.add("virtio-sensor-pci"); diff --git a/template/w-x86-standard-template.xml b/template/w-x86-standard-template.xml index b586c2f..b918252 100644 --- a/template/w-x86-standard-template.xml +++ b/template/w-x86-standard-template.xml @@ -51,10 +51,13 @@ - + + + + diff --git a/template/w-x86-standard.xml b/template/w-x86-standard.xml index 429f2a5..8e25741 100644 --- a/template/w-x86-standard.xml +++ b/template/w-x86-standard.xml @@ -40,6 +40,9 @@ + + + -- 2.7.4