Fixing a bug in ColorControl.
authorrtrimana <rtrimana@uci.edu>
Mon, 5 Aug 2019 19:39:56 +0000 (12:39 -0700)
committerrtrimana <rtrimana@uci.edu>
Mon, 5 Aug 2019 19:39:56 +0000 (12:39 -0700)
ColorControl/ColorControls.groovy

index 4919ebe..a85298d 100644 (file)
@@ -192,17 +192,17 @@ public class ColorControls {
                }
        }
 
-       def on(String currentSwitch) {
-               if (currentSwitch != this.currentSwitch) {
-                       this.currentSwitch = currentSwitch
-                       colorControls[0].on(currentSwitch)                      
+       def on() {
+               if (this.currentSwitch != "on") {
+                       this.currentSwitch = "on"
+                       colorControls[0].on()                   
                }
        }
 
-       def off(String currentSwitch) {
-               if (currentSwitch != this.currentSwitch) {
-                       this.currentSwitch = currentSwitch
-                       colorControls[0].off(currentSwitch)                     
+       def off() {
+               if (this.currentSwitch != "off") {
+                       this.currentSwitch = "off"
+                       colorControls[0].off()
                }
        }