Adding a feature to detect potential motion sensor conflict through acceleration...
authorrtrimana <rtrimana@uci.edu>
Sat, 27 Jul 2019 18:30:48 +0000 (11:30 -0700)
committerrtrimana <rtrimana@uci.edu>
Sat, 27 Jul 2019 18:30:48 +0000 (11:30 -0700)
Extractor/ExtractorScript.py

index 974afc4..f762b81 100644 (file)
@@ -103,6 +103,7 @@ def AnalyzeCapabilities(Temp, appName, F):
                        Temp == "capability.illuminanceMeasurement" or
                        #Motion related
                        Temp == "capability.motionSensor" or
+                       Temp == "capability.accelerationSensor" or
                        #Water related
                        Temp == "capability.valve" or
                        Temp == "capability.waterSensor" or
@@ -131,7 +132,8 @@ def AnalyzePhysicalInteraction(app1Capab, app2Capab):
                        "capability.switchLevel" in app2Capab):
                print ("\nWARNING: Potential PHYSICAL CONFLICT (light) detected between App1 and App2!\n")
        #Motion
-       if ("capability.motionSensor" in app1Capab):
+       # TODO: Technically this is not entirely precise since we need to be able to detect that the other app creates motion
+       if ("capability.motionSensor" in app1Capab) or ("capability.accelerationSensor" in app1Capab):
                print ("\nWARNING: Potential PHYSICAL CONFLICT (motion) detected between App1 and App2!\n")             
        #Water
        if ("capability.waterSensor" in app1Capab) and ("capability.valve" in app2Capab or