-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Current Behavior
There seems to be general weirdness around the handling of barometers that use MSP protocol.
I am using the Matek M8Q-CAN GPS/Mag/Baro unit.
I'm not using the UAVCAN port because iNav doesn't support that.
I'm not using the I2C port because my flgiht controller (ZEEZ F7 V1) doesn't have any I2C pads.
So I'm forced into using all three devices over a UART with MSP protocol, which works up to a point.
I configure my ports and devices like this:

In this configuration, GPS and MAG work fine, BARO is weird.
- On power-up, iNav configurator shows that the baro is "OK" even if it is powered down or physically disconnected.

Once I plug in the battery, MAG and GPS light up too, but BARO is always there, even though it isn't.
Update: I now understand that this is default behaviour for MSP devices
-
If I plug in the USB first, then the battery, the barometer gives no readings (constant zero).
-
If I plug in the battery first, then USB, the BARO gives readings and I can see it changing on the Sensors screen.

-
When I fly the quad, my OSD Altitude reading hovers around zero (plus or minus 3m) even if the quad is more than 50m in the air. Here's a YouTube video that shows that. If I plug in a USB cable and look at the sensors in this condition, the BARO will be stuck on zero. Now here's the thing. If I go into Configuration and change the BARO to something else, say BMP280, save and reboot - the FC will freak out because "hardware fail". Now if I reconnect, go in and change BARO back to MSP, save and reboot, it will be giving readings again. Unfortunately I cannot do this in the field because there is a bug in SpeedyBee adaptor that prevents me from opening the Configuration page!!!! So it basically means I can't fly the quad.
Update - I filed a bug report with RunCam and they have updated the SpeedyBee app, which fixes the config page issue.
Steps to Reproduce
- You're probably going to need a BARO device that talks MSP, such as the Matek M8Q-CAN module with current firmware.
If I thought someone was going to seriously work on the issue, I would be prepared to buy you one.
Other than that, I haven't been able to narrow down an exact repro. It seems a bit random, almost like there's a race condition. Sometimes the baro works, sometimes it doesn't, I've had a 100% failure rate when I try to fly, but on the bench sometimes it works.
I made two videos showing it working vs. non-working. I used serial logging to capture black box data. I armed the quad on my bench and physically lifted it up and down 3 times as far as the USB lead would allow (about 0.8m). I plotted this data against accelerometers so it is clear when teh craft is moving. First attempt, it was not working. Then I rebooted and fiddled around until I got barometer readings in the Sensors screen, disconnected Configurator and ran another test.
Video: Barometer working
Video: Barometer not working
Expected behavior
The barometer should not be indicated as "OK" when it is powered down or physically disconnected.- The barometer should work regardless of whether the USB or battery is connected first.
- The barometer/OSD reading should not be stuck at zero when flying.
Suggested solution(s)
I'm afraid I don't know enough about the internals of iNav to offer any useful suggestions.
I have tried to read the code and asked about it on both Facebook and Discord, but none of the devs have responded to my questions.
Additional context
Config dump attached. INAV_cli_Palantir_3_20211107_160858-iNav-Baro-Issue.txt
- FC Board name and vendor: ZEEZ F7 (original V1 without baro or I2C)
- INAV version string:
# version # INAV/ZEEZF7 3.0.2 Sep 15 2021 / 08:54:29 (66011184) # GCC-9.3.1 20200408 (release)

