fix bad code style. add motor encoder support for motorB rotation restriction