Skip to content
Snippets Groups Projects
Commit 421fda7f authored by Tim Stadtmann's avatar Tim Stadtmann
Browse files

Internal tachocnt is reset if motor moved manually

Also, on syncedStart, both motors are now reset.
parent 11b4f291
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ classdef Motor < MaskedHandle & dynamicprops
% If the motor coasts into its stops, the internal tachocount has to be reset
% before each start for it to behave predictable
if motor.brakeMode_ == BrakeMode.Coast
if motor.brakeMode_ == BrakeMode.Coast || motor.internalTachoCount ~= 0
motor.internalReset();
end
......@@ -342,8 +342,9 @@ classdef Motor < MaskedHandle & dynamicprops
% If the motor coasts into its stops, the internal tachocount has to be reset
% before each start for it to behave predictable
if motor.brakeMode_ == BrakeMode.Coast
if motor.brakeMode_ == BrakeMode.Coast || motor.internalTachoCount ~= 0
motor.internalReset();
syncMotor.internalReset();
end
if motor.state.sendOnStart > 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment