-
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
creating "safe mode" #2888
creating "safe mode" #2888
Conversation
5d69b46
to
0568e1f
Compare
0568e1f
to
1caa7aa
Compare
get is_safe() { | ||
// We can potentially check for external things here | ||
return !this.verhicle_armed | ||
} | ||
|
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.
why is this not calling the backend instead?
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 will give us feedback at 1hz, I don't want yet another thing polling the backends at 1hz for no reason...
I can add to the comment "such as ardupilotManager's /safe endpoint"
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 why we have the safe endpoint in the backend ?
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.
hmm, so why was the backend endpoint added?
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.
for subsequent backend-based validations, such in ardupilot_manager.py and whatever else
@@ -290,6 +290,12 @@ async def available_boards() -> Any: | |||
return await autopilot.available_boards(True) | |||
|
|||
|
|||
@app.get("/safe") |
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.
Doesn't make more sense to move to "armed" ? Safe is to abstracted, and armed is a common term.
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.
@patrickelectric I think safe
can abstract more than just arm
, in case we want to check for other things..?
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.
any idea of other things that the backend of ardupilot_manager may know ?
It would be nice to have a comment about 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.
if there's a flashing operation in progress, for example, I'll add comments and/or more checking
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.
comment added, I'll leave the actual blocking checks to after @JoaoMario109 's refactor is done
…med (and possibly others in the future)
1caa7aa
to
db8c947
Compare
helps #2752