fix abrupt speed change bug in smartmotor library

Signed-off-by: James Pearman <jbpearman@mac.com>