fix(pkg/rgbled): description for exported functions
This commit is contained in:
parent
b2bd4f8fe6
commit
6fd6eb7f0d
@ -8,6 +8,7 @@ import (
|
||||
"github.com/go-flucky/flucky/pkg/types"
|
||||
)
|
||||
|
||||
// Blue makes all RGB-LEDs which are passed as parameters light up blue.
|
||||
func Blue(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorBlue
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -16,6 +17,8 @@ func Blue(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CustomColor makes all RGB-LEDs which are passed as parameters light up in
|
||||
// custom color.
|
||||
func CustomColor(rgbLEDs []RGBLED, color types.LEDColor) error {
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
return err
|
||||
@ -23,6 +26,7 @@ func CustomColor(rgbLEDs []RGBLED, color types.LEDColor) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Green makes all RGB-LEDs which are passed as parameters light up in green.
|
||||
func Green(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorGreen
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -31,6 +35,7 @@ func Green(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Off turns all RGB-LEDs which are passes as parameters off.
|
||||
func Off(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorNone
|
||||
if err := operate(rgbLEDs, false, color); err != nil {
|
||||
@ -39,6 +44,7 @@ func Off(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Purple makes all RGB-LEDs which are passed as parameters light up in purple.
|
||||
func Purple(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorPurple
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -47,6 +53,7 @@ func Purple(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Red makes all RGB-LEDs which are passed as parameters light up in red.
|
||||
func Red(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorRed
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -55,6 +62,8 @@ func Red(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Turquoise makes all RGB-LEDs which are passed as parameters light up in
|
||||
// turquoise.
|
||||
func Turquoise(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorTurquoise
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -63,6 +72,7 @@ func Turquoise(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// White makes all RGB-LEDs which are passed as parameters light up in white.
|
||||
func White(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorWhite
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
@ -71,6 +81,7 @@ func White(rgbLEDs []RGBLED) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Yellow makes all RGB-LEDs which are passed as parameters light up in yellow.
|
||||
func Yellow(rgbLEDs []RGBLED) error {
|
||||
color := types.LEDColorYellow
|
||||
if err := operate(rgbLEDs, true, color); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user