Wearable sensor: Add sensor option.(press,uv,hrm)
authorminkee.lee <minkee.lee@samsung.com>
Wed, 22 Oct 2014 06:32:50 +0000 (15:32 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Wed, 22 Oct 2014 10:10:39 +0000 (19:10 +0900)
Change-Id: I280978a8d2edb606349dbf221aee359e35ee335c
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
plugin-project/wearable-plugin/src/org/tizen/emulator/manager/wearable/vms/Launcher.java
template/w-x86-standard-template.xml
template/w-x86-standard.xml

index 75a0aff..131f69d 100644 (file)
@@ -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");
index b586c2f..b918252 100644 (file)
                <item type="checkLabel" name="sensor" title="Sensor">
                        <item type="checkbox" name="accel" title="Accelerometer"/>
                        <item type="checkbox" name="gyro" title="Gyroscope"/>
-                       <item type="checkbox" name="geo" title="Geo-magnetic"/>
+                       <item type="checkbox" name="geo" title="Geomagnetic"/>
                        <item type="checkbox" name="proxi" title="Proximity"/>
                        <item type="checkbox" name="light" title="Light"/>
                        <item type="checkbox" name="haptic" title="Haptic"/>
+                       <item type="checkbox" name="press" title="Pressure"/>
+                       <item type="checkbox" name="uv" title="Ultraviolet"/>
+                       <item type="checkbox" name="hrm" title="Heartbeat Rate"/>
                </item>
                <item type="checkLabel" name="device" title="Device">
                        <item type="checkbox" name="camera" title="Camera"/>
index 429f2a5..8e25741 100644 (file)
@@ -40,6 +40,9 @@
                        <subOption name="light" value="on"/>
                        <subOption name="proxi" value="on"/>
                        <subOption name="haptic" value="on"/>
+                       <subOption name="press" value="on"/>
+                       <subOption name="uv" value="on"/>
+                       <subOption name="hrm" value="on"/>
                </option>
     </advancedOption>
 </EmulatorConfiguration>