fixed wring memory access; adjusted log

master
Giovanni Harting 3 years ago
parent c6d1a306a9
commit 167904c583
  1. 8
      ledd.go

@ -135,7 +135,7 @@ func (manager *LEDManager) start() {
for {
select {
case led := <-manager.add:
log.Debugf("[%s] Request to add LED: %s (%s)", led.Backend, led.Name, led.Channel)
log.Debugf("[%s] Request to add LED: %s (%s) (%s)", led.Backend, led.Name, led.Channel, led.Correction)
if led.Name == "" || len(led.Channel) == 0 || led.Backend == "" {
log.Warningf("[%s] Can't add LED without required information! (%s)", LOG_CLIENTS, led)
@ -203,9 +203,9 @@ func (manager *LEDManager) color(led *LED) {
cMap[led.Channel[1]] = color.G
cMap[led.Channel[2]] = color.B
fMap[led.Channel[0]] = led.Correction[led.Channel[0]]
fMap[led.Channel[1]] = led.Correction[led.Channel[1]]
fMap[led.Channel[2]] = led.Correction[led.Channel[2]]
fMap[led.Channel[0]] = led.Correction[0]
fMap[led.Channel[1]] = led.Correction[1]
fMap[led.Channel[2]] = led.Correction[2]
wrapperMsg := &ledd.BackendWrapperMessage{
Msg: &ledd.BackendWrapperMessage_MSetChannel{

Loading…
Cancel
Save