add http router

This commit is contained in:
Jay
2020-04-17 17:14:04 +08:00
parent 31150c8280
commit aa68871e8d
5 changed files with 125 additions and 1 deletions
+10
View File
@@ -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")