Fix car integration

This commit is contained in:
cyrilix committed 2020-02-03 19:16:07 +01:00
1 parent dca1c25f11
commit 932e447cf1
3 files changed
+6 -17

No files matched your search

+2 -2
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
}
+1 -1
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
}