mit-racecar / vesc

71 stars 106 forks source link

fix bug in clip function #1

Closed darsor closed 8 years ago

darsor commented 8 years ago

The VescDriver::CommandLimit::clip function is meant to ensure that a given value is within the correct range.

Previously it would only return a value if that value was clipped. It now returns the original value if it is not clipped.

We found this bug when the servo and speed commands would only work at the high and low points (using a joystick teleop). With this fix, the servo and speed commands have a full variable range.

mboulet commented 8 years ago

Interesting that this was not discovered previously. Thanks.