add http router
This commit is contained in:
1 parent
31150c8280
commit
aa68871e8d
5 files changed
+125
-1
No files matched your search
@@ -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