add http router

This commit is contained in:
root committed 2020-04-17 17:14:04 +08:00
1 parent 31150c8280
commit aa68871e8d
5 files changed
+125 -1

No files matched your search

+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")