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

HUD/PrearmStatus: fix failure messages #3250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertlong13
Copy link
Collaborator

@robertlong13 robertlong13 commented Dec 1, 2023

When prearm checks are failing, the HUD displays the last failure message, even if that message is very stale. This changes it so it displays the latest failure message since the last time it passed the prearm check. The prearm failure messages were also moved to the lowest priority, so that they would not mask other sensor failures.

The PrearmStatus window had a similar problem, where it would show all failure messages briefly when it first launched, instead of the latest relevant ones.

Also, a drive-by fix of where the messageHigh setter function sets the _messageHighTime variable, which was causing flickers.

@robertlong13
Copy link
Collaborator Author

@meee1 another simple bug fix PR when you get a chance

@robertlong13
Copy link
Collaborator Author

robertlong13 commented Sep 18, 2024

Basically, as soon as you land, and get a prearm failure for still being in the landing sequence, you'll briefly get something like "accels unhealthy" or "IMU temperature low" on the HUD, which wasn't true. That was leading to some errant support questions.

When prearm checks are failing, the HUD displays the last failure message,
even if that message is very stale. This changes it so it displays the
latest failure message since the last time it passed the prearm check. The
prearm failure messages were also moved to the lowest priority, so that they
would not mask other sensor failures.

The PrearmStatus window had a similar problem, where it would show all
failure messages briefly when it first launched, instead of the latest
relevant ones.

Also, a drive-by fix of where the messageHigh setter function sets the
_messageHighTime variable, which was causing flickers.
@robertlong13
Copy link
Collaborator Author

robertlong13 commented Sep 20, 2024

Here's a tlog I created so you can reproduce the behavior I'm talking about and test that the PR fixes it. Right after landing, the HUD pops up a "PreArm: Gyros inconsistent", even though the real reason it's failing is that you are in a landing sequence and are in AUTO without the next command being a takeoff.

Try replaying this log on master and with this PR to see what I mean.

2024-09-21 08-26-07.zip

What it says after the flight
Screenshot 2024-09-21 082744

Why it's actually failing prearm
Screenshot 2024-09-21 082754

The idea behind my fix is that there's no reason to assume that the current reason for not-ready-to-arm has anything to do with any previous one. This is especially true if the last case was several minutes or hours ago, but I think it's best to only display prearm failure messages that have come in since the prearm status went red.

This is a very common thing I have to explain to people
"Hey something is wrong with the aircraft, I keep getting 'gyros are inconsistent'"
"Nah, that just happens if you connect within like 10 seconds of bootup"
"No, it happened when I landed"
"No, check the messages tab, the aircraft didn't actually send that."

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.

1 participant