From 167904c583bea3b4d2cd2a9938706f3174d631db Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Sun, 5 May 2019 22:15:31 +0200 Subject: [PATCH] fixed wring memory access; adjusted log --- ledd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ledd.go b/ledd.go index 7e9ccee..c495596 100644 --- a/ledd.go +++ b/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{