fixed wring memory access; adjusted log
This commit is contained in:
8
ledd.go
8
ledd.go
@@ -135,7 +135,7 @@ func (manager *LEDManager) start() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case led := <-manager.add:
|
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 == "" {
|
if led.Name == "" || len(led.Channel) == 0 || led.Backend == "" {
|
||||||
log.Warningf("[%s] Can't add LED without required information! (%s)", LOG_CLIENTS, led)
|
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[1]] = color.G
|
||||||
cMap[led.Channel[2]] = color.B
|
cMap[led.Channel[2]] = color.B
|
||||||
|
|
||||||
fMap[led.Channel[0]] = led.Correction[led.Channel[0]]
|
fMap[led.Channel[0]] = led.Correction[0]
|
||||||
fMap[led.Channel[1]] = led.Correction[led.Channel[1]]
|
fMap[led.Channel[1]] = led.Correction[1]
|
||||||
fMap[led.Channel[2]] = led.Correction[led.Channel[2]]
|
fMap[led.Channel[2]] = led.Correction[2]
|
||||||
|
|
||||||
wrapperMsg := &ledd.BackendWrapperMessage{
|
wrapperMsg := &ledd.BackendWrapperMessage{
|
||||||
Msg: &ledd.BackendWrapperMessage_MSetChannel{
|
Msg: &ledd.BackendWrapperMessage_MSetChannel{
|
||||||
|
Reference in New Issue
Block a user