fixed wring memory access; adjusted log

This commit is contained in:
Giovanni Harting 2019-05-05 22:15:31 +02:00
parent c6d1a306a9
commit 167904c583
1 changed files with 4 additions and 4 deletions

View File

@ -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{