1
0
Fork 0

잘못된 슬라이스 복사로직수정

This commit is contained in:
Sangbum Kim 2017-09-11 01:09:45 +09:00
parent ca421b372e
commit 128ae98e91
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ func (c *fanControl) StartControl() {
} }
} }
if (!compareFanSpeed(fanSpeedList, newFanSpeedList)) { if (!compareFanSpeed(fanSpeedList, newFanSpeedList)) {
fanSpeedList = newFanSpeedList copy(fanSpeedList, newFanSpeedList)
args := make([]string, 0) args := make([]string, 0)
args = append(args, "raw", "0x3a", "0x01", ) args = append(args, "raw", "0x3a", "0x01", )
for _, item := range fanSpeedList { for _, item := range fanSpeedList {
@ -79,7 +79,7 @@ func (c *fanControl) StartControl() {
return return
} }
buf := bytes.NewBufferString("") buf := bytes.NewBufferString("")
for _, item := range fanSpeedList { for _, item := range newFanSpeedList {
buf.WriteString(fmt.Sprintf("0x%x", item)) buf.WriteString(fmt.Sprintf("0x%x", item))
buf.WriteRune(' ') buf.WriteRune(' ')
} }