Some minor changes!
authoramiraj <amiraj.95@uci.edu>
Sat, 10 Aug 2019 21:59:34 +0000 (14:59 -0700)
committeramiraj <amiraj.95@uci.edu>
Sat, 10 Aug 2019 21:59:34 +0000 (14:59 -0700)
Extractor/ExtractorScript.py
Switch/Switches.groovy
eventSimulator/buttonHeldEvent.groovy
eventSimulator/buttonPushedEvent.groovy

index a5d46c8..2c96590 100644 (file)
@@ -461,6 +461,7 @@ def ExtractEvents(extractedEvents):
                                extractedEvents.write(line)
                        event.close()
                elif eventList[i] == "motion":
+                        print("HERE????")
                        #Write two events subsequently
                        event = open("eventSimulator/motionActiveEvent.groovy", "r")                    
                        for line in event:
index c27440d..152096d 100644 (file)
@@ -51,6 +51,9 @@ public class Switches {
        def each(Closure Input) {
                switches.each(Input)
        }
+       def eachWithIndex(Closure Input) {
+               switches.eachWithIndex(Input)
+       }
        def find(Closure Input) {
                switches.find(Input)
        }
index 76209df..8a8f90d 100644 (file)
@@ -1,2 +1,11 @@
                        buttonObject.setValue([name: "button", value: "held", deviceId: "switchID0", descriptionText: "",
-                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 3}'])
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 1}'])
+
+                       buttonObject.setValue([name: "button", value: "held", deviceId: "switchID0", descriptionText: "",
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 2}'])
+
+                       buttonObject.setValue([name: "button", value: "held", deviceId: "switchID0", descriptionText: "",
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 3}'])                   
+
+                       buttonObject.setValue([name: "button", value: "held", deviceId: "switchID0", descriptionText: "",
+                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 4}'])
index 0792d4f..d6013e1 100644 (file)
@@ -1,2 +1,11 @@
+                        buttonObject.setValue([name: "button", value: "pushed", deviceId: "switchID0", descriptionText: "",
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 1}'])
+
+                        buttonObject.setValue([name: "button", value: "pushed", deviceId: "switchID0", descriptionText: "",
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 2}'])
+
+                        buttonObject.setValue([name: "button", value: "pushed", deviceId: "switchID0", descriptionText: "",
+                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 3}'])
+
                        buttonObject.setValue([name: "button", value: "pushed", deviceId: "switchID0", descriptionText: "",
-                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 3}'])
+                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 4}'])