Upgrade dependencies

This commit is contained in:
2020-03-01 19:44:59 +01:00
parent 7da813e837
commit 9f53e7412b
212 changed files with 22085 additions and 13453 deletions

View File

@ -48,14 +48,14 @@ func (p *ThrottlePart) Start() error {
for {
select {
case <-ticker.C:
p.publishPilotValue()
p.onPublishPilotValue()
case <-p.cancel:
break
}
}
}
func (p *ThrottlePart) publishPilotValue() {
func (p *ThrottlePart) onPublishPilotValue() {
p.muDriveMode.RLock()
defer p.muDriveMode.RUnlock()
@ -64,8 +64,8 @@ func (p *ThrottlePart) publishPilotValue() {
}
throttleMsg := events.ThrottleMessage{
Throttle: p.minThrottle,
Confidence: 1.0,
Throttle: p.minThrottle,
Confidence: 1.0,
}
payload, err := proto.Marshal(&throttleMsg)
if err != nil {
@ -104,7 +104,7 @@ func (p *ThrottlePart) onRCThrottle(_ mqtt.Client, message mqtt.Message) {
}
}
var registerCallbacks = func (p *ThrottlePart) error {
var registerCallbacks = func(p *ThrottlePart) error {
err := service.RegisterCallback(p.client, p.driveModeTopic, p.onDriveMode)
if err != nil {
return err