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

sensors/vehicle_air_data: don't publish if there aren't any healthy sensors remaining #15224

Closed
wants to merge 1 commit into from

Conversation

dagar
Copy link
Member

@dagar dagar commented Jun 26, 2020

Possible fix for #15223.

@dagar dagar added the bug label Jun 26, 2020
@dagar dagar requested a review from julianoes June 26, 2020 13:40
@dagar
Copy link
Member Author

dagar commented Jun 30, 2020

This has been pulled into #15235 where the same issue was fixed for magnetometers (and verified).

@dagar dagar closed this Jun 30, 2020
@julianoes
Copy link
Contributor

julianoes commented Jul 2, 2020

@dagar this does not actually work. The only output I see is:

[px4         ] ERROR [vehicle_air_data] sensor_baro:#0 failed:  STALE!, reconfiguring priorities

but nothing regarding switching to GPS.

Here is a log: https://logs.px4.io/plot_app?log=6da28929-ce23-48be-8b28-d0b319d07e13

@dagar
Copy link
Member Author

dagar commented Jul 2, 2020

Yes, I debugged and fixed it as part of #15235.

What I discoverd is that the validator group state (overall error) doesn't clear until all the sensors are back to healthy. So instead what I did was only publish the current primary if it's healthy. Thanks for testing it.

https://github.com/PX4/Firmware/blob/42a4f844424ba8269a82ded6680eb92a63b13af1/src/modules/sensors/vehicle_air_data/VehicleAirData.cpp#L192-L194

@dagar dagar deleted the pr-sensors_baro_stuck branch July 2, 2020 13:23
@julianoes
Copy link
Contributor

@dagar when I tested #15235 it didn't work either. I'll try again.

@julianoes
Copy link
Contributor

@dagar ok I tried again and I can see that it does fall back but there are two issues with it:

  1. It takes about 25 seconds until it switches even though it could do much quicker, right?
  2. Once you land and do another flight it climbs indefinitely.

@julianoes
Copy link
Contributor

@dagar ok you're right, it works correctly but only if the temperature is also "stuck". I had to fix that with 358799b.

@julianoes julianoes restored the pr-sensors_baro_stuck branch July 7, 2020 11:25
@LorenzMeier LorenzMeier deleted the pr-sensors_baro_stuck branch January 18, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants