From a3786c8698f8b7c85d09e241cf09dc0e8ced9da2 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Thu, 24 May 2018 22:23:35 -0400 Subject: Split out updateLight function --- colortemp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'colortemp.go') diff --git a/colortemp.go b/colortemp.go index a708a0b..8cf3454 100644 --- a/colortemp.go +++ b/colortemp.go @@ -43,7 +43,7 @@ func getDesiredColorTemperature(t time.Time) ColorTemperature { // 500 <=> 2000K // ============= // 347 4500 -func translateCtForLight(ct ColorTemperature, light hue.Light) uint16 { +func (ct ColorTemperature) TranslateForLight(light hue.Light) uint16 { divisor := 12.968 scaled := float64(ct) / divisor inverted := 500 - scaled + 153 -- cgit v1.2.3