diff --git a/consumer/speed_controller.go b/consumer/speed_controller.go index a26cc60..9544fe1 100644 --- a/consumer/speed_controller.go +++ b/consumer/speed_controller.go @@ -64,7 +64,7 @@ func (c *fanControl) StartControl() { } } if (!compareFanSpeed(fanSpeedList, newFanSpeedList)) { - fanSpeedList = newFanSpeedList + copy(fanSpeedList, newFanSpeedList) args := make([]string, 0) args = append(args, "raw", "0x3a", "0x01", ) for _, item := range fanSpeedList { @@ -79,7 +79,7 @@ func (c *fanControl) StartControl() { return } buf := bytes.NewBufferString("") - for _, item := range fanSpeedList { + for _, item := range newFanSpeedList { buf.WriteString(fmt.Sprintf("0x%x", item)) buf.WriteRune(' ') }