Changing Verify API call scheme for device handlers.
[smartthings-infrastructure.git] / ColorControl / ColorControls.groovy
index a85298d2ebbd9b459c6eeb4c572ae6d42dd8bfa4..6fc62aa14461788cf41218f7f2828ffaa9edd9b6 100644 (file)
@@ -2,9 +2,6 @@
 package ColorControl
 import Timer.SimulatedTimer
 
-//JPF's Verify API
-import gov.nasa.jpf.vm.Verify
-
 public class ColorControls {
        private int deviceNumbers
        private List colorControls
@@ -26,27 +23,22 @@ public class ColorControls {
        private int colorTemperature = 15000
        
 
-       ColorControls(Closure sendEvent, int deviceNumbers) {
+       ColorControls(Closure sendEvent, int deviceNumbers, boolean init) {
                this.sendEvent = sendEvent
                this.deviceNumbers = deviceNumbers
                this.colorControls = []
 
-               /*def initHue = Verify.getIntFromList(30, 50)
-               this.hue = initHue
-               def initSat = Verify.getIntFromList(40, 50)
-               this.saturation = initSat
-               def initColor = Verify.getBoolean()
-               if (initColor) {
-                       this.color = "red"
-               } else {
-                       this.color = "blue"
-               }
-               def init = Verify.getBoolean()
                if (init) {
+                       this.hue = 30
+                       this.saturation = 40
+                       this.color = "red"
                        this.currentSwitch = "off"
                } else {
+                       this.hue = 50
+                       this.saturation = 50
+                       this.color = "blue"
                        this.currentSwitch = "on"
-               }*/
+               }
 
                colorControls.add(new ColorControl(sendEvent, id, label, displayName, this.color, this.hue, this.saturation, this.level, this.currentSwitch, this.colorTemperature))
        }