Im using a bdcm with halls feedback in position mode. My application needs to issue incremental positions (i.e. every position command must rotate the motor cw or ccw a specific amount from the last movement). Since this is a ground vehicle, it could move miles in any direction which would overflow the position since its stored as a float.
So I created a ‘reset position’ command (i designated it ‘t’) in the acsii_protocol.cpp. In text function I created for the ‘t’ command, I call a function in axis.cpp that first sets encoder_.pos_estimate_ = 0, then calls controller_.reset(). The result is just moving the motor back to position 0, not what I need. I want it to set its current position to 0 again w/o moving the motor to 0.