Fixed #239; Constrain motor signals to allowed range

Tested on hardware.
Merge branch 'bug-239'