Fixing a bug: unlock is supposed to be recognized as lock event.
authorrtrimana <rtrimana@uci.edu>
Wed, 7 Aug 2019 00:51:52 +0000 (17:51 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 7 Aug 2019 00:51:52 +0000 (17:51 -0700)
Extractor/ExtractorScript.py

index 5d92fc4..1172b4e 100644 (file)
@@ -76,6 +76,7 @@ eventTypesMap =          {'alarm.both': 'alarm',
                                                'mode.away' : 'location',
                                                'mode.home' : 'location',
                                                'mode.night' : 'location',
+                                               'unlock' : 'lock',
                                                'lock.locked' : 'lock',
                                                'lock.unlocked' : 'lock',
                                                'motion.active' : 'motion',
@@ -331,6 +332,7 @@ def ExtractEvents(extractedEvents):
        #print "DEBUG: App1: %d" % indexApp1
        #print "DEBUG: App2: %d" % indexApp2
        #print "DEBUG: eventList: %d" % len(eventList)
+       #print eventList
        isApp1 = True
        while counter < numOfActualEvents:
                # Interleave events from App1 and App2
@@ -359,9 +361,6 @@ def ExtractEvents(extractedEvents):
                        for line in event:
                                extractedEvents.write(line)
                        event.close()
-               elif eventList[i] == "unlock":
-                       #Don't do anything for this case
-                       counter = counter - 1
                elif eventList[i] == "nfcTouch":
                        event = open("eventSimulator/nfcTouchEvent.groovy", "r")
                        for line in event: