aboutsummaryrefslogtreecommitdiff
path: root/light.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-08 22:32:17 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-08 22:32:17 -0500
commitabceafb4b9a9551f0c237f3435c3f3d9e0f224d8 (patch)
treefb05832319f08c1af518c52a32c048f4a467887f /light.go
parent2f3b850a28e8d6640a063ca238a56dd9550e654c (diff)
Added documentation to the 3 colorloop functions.
Diffstat (limited to 'light.go')
-rw-r--r--light.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/light.go b/light.go
index 0caca2e..565feca 100644
--- a/light.go
+++ b/light.go
@@ -70,14 +70,19 @@ func (self *Light) Toggle() error {
}
}
+// Light.ColorLoopOn will turn the light on and set the effect to "colorloop"
func (self *Light) ColorLoopOn() error {
return SetLightState(self, LightState{On: true, Effect: "colorloop"})
}
+// Light.ColorLoopOn will turn the light on and set the effect to "none"
func (self *Light) ColorLoopOff() error {
return SetLightState(self, LightState{On: true, Effect: "none"})
}
+// Light.ColorLoop will set the light state to a colorloop if there is no
+// current effect in place or if the state is in colorloop then it will
+// set it to "none".
func (self *Light) ColorLoop() error {
if self.State.Effect == "colorloop" {
return self.ColorLoopOff()