-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-833: add motor names to motor errors #1682
RSDK-833: add motor names to motor errors #1682
Conversation
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.
So, I believe we also discussed that there are motors that should be calling NewResetZeroPositionUnsupportedError
and are currently just returning a vague error instead. I think correcting that would be in the scope of this PR. Otherwise, lgtm.
I think that in scope for this ticket is adding the motor name for all errors that are used by the Proto Methods. You can add the motor name as an input to the other error functions, or wrap an error from the main methods
We want this everywhere so we know what motor is getting an error and what the error is when you have a lot of motors connected on a robot. |
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.
I'm still not wild about the new argument to NewMotor
, but other folks seem to like that, and everything else LGTM. but I wouldn't merge this until Rand and Gautham are happy, too.
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.
To clarify, I agree with @penguinland and @randhid in the sense that I believe the NewMotor
functions should take the motor name string as the argument rather than the entire component config. The constructor function used to register the model can do the job of extracting the name from that config. Once that change is made, I feel good approving
changes to newMotor coming up |
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.
One nit in testing.
|
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.
LGTM
Part one of RSDK-833.
This part mostly takes care of
NewGoTillStopUnsupportedError
function.Added motor name to all the drivers where
NewGoTillStopUnsupportedError
is called.