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 4919ebe463070dc97715f5b96e18678b6aab086f..a85298d2ebbd9b459c6eeb4c572ae6d42dd8bfa4 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()
                }
        }