add http router
This commit is contained in:
@@ -35,6 +35,16 @@ func Get() *LEDSvc {
|
||||
return led
|
||||
}
|
||||
|
||||
func (p *LEDSvc) Stop() {
|
||||
for k := range p.blink {
|
||||
p.StopBlink(k)
|
||||
}
|
||||
|
||||
ws2812b.ClearAll()
|
||||
|
||||
close(p.done)
|
||||
}
|
||||
|
||||
func (p *LEDSvc) SetColor(pos int, color uint32) error {
|
||||
if pos < 0 || pos > p.count {
|
||||
return errors.New("out of range")
|
||||
|
||||
Reference in New Issue
Block a user