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
AP_ExternalAHRS: Provide warning for init failure #26601
AP_ExternalAHRS: Provide warning for init failure #26601
Conversation
d00608f
to
8bb2d30
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.
better to add a pre arm failure
@@ -238,7 +238,6 @@ bool AP_ExternalAHRS::pre_arm_check(char *failure_msg, uint8_t failure_msg_len) | |||
|
|||
if (!state.have_origin) { | |||
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: No origin"); | |||
return false; |
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 this failure get lost now?
Maybe it would be better to re-order so that the backend pre-arms come before the origin check?
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 this failure get lost now?
Maybe it would be better to re-order so that the backend pre-arms come before the origin check?
Yea, a re-order would solve it. The origin problem is likely to make the other ones get lost.
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.
Yea, totally. I re-ordered it, and it works great now! Easy fix.
* If the device hasn't initialized in 5 seconds, give a warning Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* Add generic health and time utils * Fix bug only checking first GNSS system * Use common logging struct * Improve pre-arm log checks Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
46cc7b9
to
df6ee02
Compare
* This allows the backend to report more detailed errors * Before this, many pre-arm errors were hidden by origin failure * If pre-arm could report multiple errors, that would be ideal Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
df6ee02
to
92a60d0
Compare
This is included in 4.5.2-beta1 |
Purpose
No cable connected
Cable connected and data streaming configured
Other thoughts
perhaps we should keep track of the initialization state, and give a success when it changes to true (event-based)? I did this in a follow up commit. If the devs like it, I'll squash it together. Pete suggested reordering the pre-arm checks to check the backend before verifying the origin. I liked it, so that's incorporated.