1
0
Fork 0

잘못된 코드 수정

This commit is contained in:
Sangbum Kim 2017-09-13 00:42:29 +09:00
parent 6a7879926d
commit bca37ebec0
1 changed files with 1 additions and 0 deletions

View File

@ -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():