fixed wrong var decl
This commit is contained in:
4
main.go
4
main.go
@@ -46,7 +46,7 @@ type LedDaemon struct {
|
|||||||
|
|
||||||
var log = logging.MustGetLogger("LedD")
|
var log = logging.MustGetLogger("LedD")
|
||||||
var ledDaemon = &LedDaemon{}
|
var ledDaemon = &LedDaemon{}
|
||||||
var pca9685 = device.PCA9685{}
|
var pca9685 = &device.PCA9685{}
|
||||||
var pwmMap = map[int32]*device.Pwm{}
|
var pwmMap = map[int32]*device.Pwm{}
|
||||||
|
|
||||||
func check(e error) {
|
func check(e error) {
|
||||||
@@ -129,7 +129,7 @@ func main() {
|
|||||||
check(err)
|
check(err)
|
||||||
defer i2cDevice.Close()
|
defer i2cDevice.Close()
|
||||||
|
|
||||||
pca9685 := device.NewPCA9685(i2cDevice, "PWM Controller", config.Pca9685.MinPulse, config.Pca9685.MaxPulse, logging.MustGetLogger("PCA9685"))
|
pca9685 = device.NewPCA9685(i2cDevice, "PWM Controller", config.Pca9685.MinPulse, config.Pca9685.MaxPulse, logging.MustGetLogger("PCA9685"))
|
||||||
pca9685.Init()
|
pca9685.Init()
|
||||||
|
|
||||||
pwmMap = make(map[int32]*device.Pwm, 1)
|
pwmMap = make(map[int32]*device.Pwm, 1)
|
||||||
|
Reference in New Issue
Block a user