diff options
author | Ben Burwell <ben@benburwell.com> | 2018-05-24 22:23:35 -0400 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2018-05-24 22:23:35 -0400 |
commit | a3786c8698f8b7c85d09e241cf09dc0e8ced9da2 (patch) | |
tree | 8739737682938a3e9847a6395563ba17707c64e5 /colortemp.go | |
parent | b279470a75dd6f3e59809650424a8e21d979eefc (diff) |
Split out updateLight function
Diffstat (limited to 'colortemp.go')
-rw-r--r-- | colortemp.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |