잘못된 코드 수정
This commit is contained in:
parent
6a7879926d
commit
bca37ebec0
|
@ -55,6 +55,7 @@ func (c *fanControl) StartControl() {
|
||||||
case <-ticker:
|
case <-ticker:
|
||||||
go c.applyFanspeed(pastFanSpeedList, newFanSpeedList)
|
go c.applyFanspeed(pastFanSpeedList, newFanSpeedList)
|
||||||
pastFanSpeedList, newFanSpeedList = newFanSpeedList, make([]int, c.processorCount)
|
pastFanSpeedList, newFanSpeedList = newFanSpeedList, make([]int, c.processorCount)
|
||||||
|
copy(newFanSpeedList, pastFanSpeedList)
|
||||||
case changedSpeed := <-c.fanSpeedConsumer:
|
case changedSpeed := <-c.fanSpeedConsumer:
|
||||||
newFanSpeedList[changedSpeed.Id] = changedSpeed.FanSpeed
|
newFanSpeedList[changedSpeed.Id] = changedSpeed.FanSpeed
|
||||||
case <-c.handler.Done():
|
case <-c.handler.Done():
|
||||||
|
|
Loading…
Reference in New Issue