Fix car integration

This commit is contained in:
2020-02-03 19:16:07 +01:00
parent dca1c25f11
commit 932e447cf1
3 changed files with 6 additions and 17 deletions

View File

@ -34,11 +34,11 @@ func (s *Steering) SetPercentValue(p float32) {
}
func NewSteering(channel, leftPWM, rightPWM int) *Steering {
t := Steering{
s := Steering{
channel: channel,
dev: device,
leftPWM: leftPWM,
rightPWM: rightPWM,
}
return &t
return &s
}

View File

@ -48,7 +48,7 @@ func NewThrottle(channel, zeroPulse, minPulse, maxPulse int) *Throttle {
}
log.Infof("send zero pulse to calibrate ESC")
t.SetPulse(zeroPulse)
t.SetPercentValue(0)
return &t
}