Skip to content
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

Merged

Conversation

Williangalvani
Copy link
Member

should fix #2206

needs testing

@joaoantoniocardoso
Copy link
Collaborator

joaoantoniocardoso commented Dec 10, 2023

I didn't test it, but just a reminder: we should show feedback that it was canceled because the user changed the window.

core/frontend/src/components/vehiclesetup/PwmSetup.vue Outdated Show resolved Hide resolved
@@ -350,11 +372,17 @@ export default Vue.extend({
},
printParam,
zero_motors() {
if (!this.has_focus) {
return
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member

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 ?

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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.

@Williangalvani Williangalvani merged commit e77593b into bluerobotics:master Jan 23, 2024
6 checks passed
@Williangalvani Williangalvani deleted the no_motors_out_of_focus branch January 23, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blueos Motors Setup page conflicts with QGC
3 participants