-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Commander: preflight check fixes #14022
Conversation
This was inverted, i.e. set to false in most cases, whereas it should be true. As a consequence, both powerCheck and airspeed.confidence checks were not executed.
refactoring only
Regression from 6dec451, leading to preflight failures not being reported at all. Only after a failed arming attempt the messages would be sent. And for GPS check failures, in case they are set to optional (default), arming would be possible, but switching to position would be rejected w/o error. We need to run the preflight checks periodically, but this at least restores the previous behavior.
I need to check some of the history here, but I recall one case where a flaky connection was breaking QGC airspeed cal with the preflight checks being triggered each reconnect. |
Let me check the details, but I believe this was intentional. In the case of airspeed the check can't run continuously because it will falsely trigger on the ground in a gust of wind. The "prearm" portion is one last chance at arming to catch a large bias in airspeed. I don't know any reason why we should wait until actually trying to arm before checking |
Huh? We're really not running these periodically? That needs to be fixed. |
@dagar These need indeed to be run periodically until the system is ready to arm. Because you need to reflect the current system readiness to the operator. |
Yes I know, I was just surprised that isn't already the case. The current state in master is to run them periodically until they pass once and the vehicle enters ARMING_STATE_STANDBY. Let's also get them to run periodically after the initial pass. |
Fixes some serious bugs around preflight checks:
prearm
flag to preflightCheckThis was inverted, i.e. set to false in most cases, whereas it should be true.
As a consequence, both powerCheck and airspeed.confidence checks were not executed.
Regression from 6dec451, leading to preflight failures not being reported at all. Only after a failed arming attempt the messages would be sent. And for GPS check failures, in case they are set to optional (default), arming would be possible, but switching to position would be rejected w/o error.
We need to run the preflight checks periodically, but this at least restores the previous behavior.