added gamma correction back

This commit is contained in:
2019-05-03 21:09:01 +02:00
parent 83cd06a2f5
commit 75d3c41a5c

View File

@@ -9,6 +9,7 @@ import (
"golang.org/x/exp/io/i2c"
"gopkg.in/yaml.v2"
"io/ioutil"
"math"
"net"
"os"
"os/signal"
@@ -96,7 +97,7 @@ func (daemon *LedDaemon) receive() {
continue
}
//vPerc = math.Pow(vPerc, 1/readConfig.Pca9685.Gamma)
v = math.Pow(v, 1/readConfig.Pca9685.Gamma)
if pwm, ok := pwmMap[c]; ok {
pwm.setPercentage(float32(v * 100))