-
Notifications
You must be signed in to change notification settings - Fork 105
frontend: add failsafe configurations #2748
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
Conversation
0b4e816
to
aada0f9
Compare
We should ask for marketing to come up with the icons if we want that in the next stable. |
aada0f9
to
37bd996
Compare
@@ -0,0 +1,231 @@ | |||
<template> | |||
<v-form |
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 should not use form, this can result in NS_BINDING_ABORTED problems.
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 don't quite recall what the issue was. care to elaborate?
also it looks like we use forms quite a lot? is this a different situation?
(first result in google is purple but I don't recall what happened)
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 don't quite recall what the issue was. care to elaborate? also it looks like we use forms quite a lot? is this a different situation? (first result in google is purple but I don't recall what happened)
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.
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.
ok that is weird. It must be a combination of things, though, right? maybe some request initialized in the form and then aborted because of the submit action?
We do have 15 other v-forms in the code, and I'm actively relying on the form validation in this component.
I'm not looking forward to changing it if the issue isn't really there.
@joaoantoniocardoso can you try the image plz? I'll do a bunch of testing here too.
I tried changing a bunch of settings both on chrome and firefox, and I couldn't see any broken requests.
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 would be okay if @joaoantoniocardoso fails to replicate the issue, he's pretty good on that 😆
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.
Great start - thanks for all the hard work on this! :-)
A few comments and suggestions, mostly around language consistency and clarity.
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
4baff56
to
b1603e1
Compare
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
4d5e352
to
643662c
Compare
SMS will work on that, we can merge after stable |
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.
Looking great! Just a few more small changes / suggestions, and these few extra things that I couldn't tie to specific lines of code:
-
It seems a little weird to be able to set negative values for the battery voltages, but that might not be something we have control over within this PR
-
When a parameter is set to a custom value (as is the case for the default value of the EKF variance threshold) the dropdown just shows up emptyThis is also a problem in the Parameters page, but it at least shows as the custom value in the main table there, and has the option to set other custom values (but I think it's ok for the failsafes page to not support setting custom values, would just be nice if it displayed them somehow)
Screen.Recording.2024-06-28.at.1.22.21.AM.mov
If this isn't fixable in this PR, I can open it as a separate issue- Resolved
-
I think it would be more intuitive if fields that are linked to an Action get greyed out/disabled when the action is set to disabled
- I'm not sure how hard that is to implement, and I can add it as a future TODO in the Issue if you don't think it's worth doing in this PR
-
I believe this box is incorrectly being set to have a background colour, when it should be transparent so the cards are surrounded by blue (like in the other configuration pages)
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Show resolved
Hide resolved
core/frontend/src/assets/img/configuration/failsafes/pressure.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/components/parameter-editor/InlineParameterEditor.vue
Outdated
Show resolved
Hide resolved
v-model.number="new_value" | ||
dense | ||
:items="as_select_items" | ||
:rules="[() => true]" |
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.
what ?
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.
also old code, doesnt's seem like it is required. removed
custom_input | ||
|| (param | ||
&& !param.options | ||
&& !param.bitmask | ||
) |
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.
custom_input | |
|| (param | |
&& !param.options | |
&& !param.bitmask | |
) | |
custom_input || (!param?.options && !param?.bitmask) |
@patrickelectric feedback so far has been positive on the existing hand-drawn designs. I've mentioned that I can neaten them up or change them to not drawn ones, but that hasn't been requested or desired by the five people who've responded. Daniel did mention that it might be a bit weird to have a different style only in this page, but we can have a think about whether that's ok since we don't have such images anywhere else, or if we perhaps want to add those kinds of images to some of our other pages as well :-) |
I agree, the feedback from SMS was: "I think we could probably keep the essence of these icons, but maybe tweak them just a little!" |
@ES-Alexander @Williangalvani after talking with @rjehangir, we agreed that the current icons can be used, but sms will be working to make them sharp. Meanwhile, if the PR gets ready, we can merge it before 1.3 stable. |
@Williangalvani there are cleaned up SVGs downloadable in the Issue, which can be switched to if you want. |
461b018
to
0f82b9f
Compare
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.
SMS requested colour changes
core/frontend/src/assets/img/configuration/failsafes/battery.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/assets/img/configuration/failsafes/heartbeat.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/assets/img/configuration/failsafes/pilot-input.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/assets/img/configuration/failsafes/pressure.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/assets/img/configuration/failsafes/temperature.svg
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue
Outdated
Show resolved
Hide resolved
core/frontend/src/components/vehiclesetup/configuration/failsafes/FailsafeCard.vue
Outdated
Show resolved
Hide resolved
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've confirmed that both aspects of the no-value parameter thing has been fixed - thanks! 😀
I did notice that now (?1) when you click save on a parameter in the Autopilot Parameters page the dialog goes into the "unchanged" state (with the save button greyed out). I think it would make more sense to just close the dialog, since the user is done with it, and otherwise the 'correct' interaction sequence is "change param, click save, click cancel", which is unintuitive.
Would be good if you can comment on the numbered items 1, 3, and 4 of my earlier review, as to whether they'll be included in this PR or I should open issues for them :-)
There are a couple of colour issues in my drawn70-set that I didn't notice before, but they should be fixed in the new SMS colours set anyway 👍
Footnotes
-
This might just be an existing interface issue with the Parameter page, rather than being new, but I've just noticed it now. ↩
core/frontend/src/components/vehiclesetup/configuration/failsafes/Failsafes.vue
Outdated
Show resolved
Hide resolved
cc8b84b
to
0865c27
Compare
@ES-Alexander the negative voltage is somewhat hard to control, the limits should be defined in the parameter metadata. As for blocking the settings if we don't have a threshold set, I think it should be a subsequent PR, and it would probably mean we should move the action up, no? 👀 |
Co-authored-by: ES-Alexander <[email protected]>
Yeah, fair enough.
Nah, I think the actions should stay at the bottom, but the rest of the card can be greyed out / disabled, so it's clearer that the other fields aren't effective until the (normal-coloured + interactive) Action field has been configured to do something :-) |
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.
Looking great! :D
Only remaining comments are:
- It'd be nice to have a non-zero minimum horizontal margin around the cards, to prevent this from being possible:
- I think low battery is more important than the pressure/temp ones, and it would also look better if it was moved up to directly after the Leak Sensor (so when they're paired up the pressure/temp ones go together and can shrink the card height)
- I'm not sure how the flat blue background is applied, but it might be worth showing the page background gradient, or at least making sure the flat background colour is defined in terms of the theme variables
I do think 1 and 2 are worth fixing, but none of those points are critical, so approving now.
Again, excellent work with this - it'll hopefully make the failsafes more approachable and widely used :-)
This implements the (for me) more relevant/important failsafes

helps #2723