DS402: Remove set_new_home functionality from homing procedure (fixes #246) #250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
homing()
method will try to manipulate the Home Offset (0x607C) parameter by default. That's not the way the parameter is intended to work. After a successful homing procedure, the drive should set the Actual Position (0x6063) to the Home Offset (0x607C) by itself. By default that is zero, so the selected reference switch flank will mark the new zero position.The library's default behavior here is backwards, and can only work with absolute position encoders. The whole point of homing is to find a physical reference and align the logical coordinate system to it. Trying to determine the desired offset from the value which an unreferenced encoder had at the physical reference point actually destroys that logical alignment.
The functionality of
set_new_home=True
is trivial to do from the application, so remove it completely fromhoming()
.