-
Notifications
You must be signed in to change notification settings - Fork 84
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
core: frontend: do not update motors when blueos is not in focus #2243
core: frontend: do not update motors when blueos is not in focus #2243
Conversation
I didn't test it, but just a reminder: we should show feedback that it was canceled because the user changed the window. |
af59dad
to
ccd7007
Compare
@@ -350,11 +372,17 @@ export default Vue.extend({ | |||
}, | |||
printParam, | |||
zero_motors() { | |||
if (!this.has_focus) { | |||
return |
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.
This is a case where we should be safe to run if out of focus no ?
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'd prefer to stop completely in case the user is trying to do something else.
We need to check if rover has a decent motor test timeout, actually.
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.
But this is zero_motors.. isn't this supposed to be the safest way than letting a undefined state ?
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.
we don't want to interfere if the user is using another software. we should probably send one zero_motors and then stop completely
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.
Can we have a comment explaining that ? This is not clear from the code.
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.
Can we have a comment explaining that ? This is not clear from the code.
the code wasn't doing it before. I added a boolean to keep track of it.
ccd7007
to
3656647
Compare
should fix #2206
needs testing