-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sm sur #295
Feature/sm sur #295
Conversation
Pull Request Test Coverage Report for Build 151
💛 - Coveralls |
xtrans=update.moves['X_TRANS'], | ||
ytrans=update.moves['Y_TRANS'], | ||
piston=update.moves['PISTON'], | ||
rot_unit=rot_unit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the update.absolute
parameter is not passed through to the SM move command. I'm guessing this is an unintentional omission? I can't remember the details but I assume that absolute moves are allowed for the SM just as for any primary segment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked through the code and this seems good to me. I did find one missing function parameter that could be passed through to the SM move command, but that's minor. Let me know if you agree with adding that and I can make that change directly.
In re-reading this code I regret that the SM is handled in a separate function from all the PMSAs; it would've been more elegant to wrap those complexities into the same function so the same API could be used, just treating the SM as segment 19. Could refactor that way at some point but it's probably not a priority right now.
@AldenJurling - wanted to ping you re: my comments on this PR from several weeks ago. Could you take a moment to look at those and let me know how you want to proceed, please? Should only take a minute or two. Thanks. |
@mperrin - I admit I don't remember exactly what I was thinking about absolute moves, but looking at the code, absolute doesn't appear to be a valid argument to move_sm_local. I'm not sure if I missed it, or just didn't pass it through since it wasn't a legal argument.
I may have just assumed it wasn't valid for the SM since it was supported downstream, but I don't have any reason to know that. If its a valid option in the SUR, which it probably is, it needs to be implemented in move_sm_local and then threaded through to it. That should be pretty easy, but I won't be able to do it right now. |
This branch adds support for SM moves to the move_sur() method. Because segment moves are made through move_seg_local and SM moves are made through move_sm_local, this requires a check in move_sur on whether the segment is, in fact, the SM, and take a different code path if it is.
In the course of this I also implemented the group= keyword argument which was previously ignored. The behaviour was unspecified so I made it take a zero-based index into the groups and execute that one.
I also added support for moves in meters because the SUR in order to process the GA SUR I was working with it.
I can rebase this branch off of your current master or latest merge commit if you prefer a cleaner history.
I'm not sure why my webbpsf master branch picked up the 2018-12 base commit its branched from.