From abceafb4b9a9551f0c237f3435c3f3d9e0f224d8 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Mon, 8 Feb 2016 22:32:17 -0500 Subject: Added documentation to the 3 colorloop functions. --- light.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'light.go') 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() -- cgit v1.2.3