This is a fairly serious bug which unfortunately I have experience with. The developers are looking into it, but for now, I’ll talk about what to look out for, what happens and what to do about. This page shows the issue report on INAV’s GitHub page. People are still responding the INAV random config change bug; hopefully it gets addressed.

The first exposure to this will come up in your OSD when you try to arm. You’ll also find this warning when you type “Status” in CLI.

Though you can change your gyro hardware LPF setting in your OSD. Sometimes that doesn’t fix everything. The thing that makes this maddening, is that this is the only parameter you can fix in the OSD menu. You may need to address other parameters too. When you see this error, my suggestion is to cancel the flight, plug in to a computer, and fix this problem.

What will happen

This has been my experience. The first warning was the gyro hardware LPF warning that occurs when you boot up and prevents the plane from arming. You can reset this issue at the field through your OSD.

For the first few minutes nothing is out of the ordinary. The plane flies and behaves like normal and you think “this is fine”. Then you’ll notice that your artificial horizon line starts to drift. Again, you think it looks bad but horizon drift is a known issue. Yes, things go from bad to much; much worse. The AHI goes away and comes back, sometimes sideways. What this means is that if you rely on AHI for any flight modes such as Horizon, Angle, or RTH; your plane will most likely crash. This is because it has a skewed perception of where the horizon is actually located. The plane will still fly in ACRO or Manual. This is important to remember because when things go south you will find yourself fighting with the plane to keep it level. Switch into ACRO and bring the plane back.

What you can do to fix this

You’ll need to do this within the CLI of your flight controller. Copy and paste the following lines into your CLI, hit enter. You can run this as a batch.

get gyro_hardware_lpf
get acc_lpf_hz
get heading_hold_rate_limit
get stats

get gyro_hardware_lpf

These are gyro filtering values. The higher they are the more susceptible it is to an unbalanced prop. The default setting for the gyro hardware LPF filter is 256 Hz. Changing this value will not affect the bug one way or the other. Thus, it’s advised to keep it at 256 Hz.

set gyro_hardware_lpf = 256HZ
save

get acc_lpf

If you see 102 or something close to that number, this is a problem. The correct value is 15. This is the single parameter that will cause you the most grief. If your plane AHI starts going insane, this is the parameter to check. Set it using

set acc_lpf_hz = 15
save

heading_hold_rate_limit

If you see 101 or 102; it may have been reset. Default is 90. 90 seems to work fine. You can reset it using

set heading_hold_rate_limit = 90
save

stats

You’ll see quite a few parameters with stats. But, the one we’re interested in is stats = on. This is your odometer. It’s nice to have. But, not a need to have. By having this on, you are saving every time you disarm. This increases the chance of you seeing the INAV random config change bug. Therefore, until there is a fix for this bug, I am suggesting you turn it off; if you don’t truly need it.

set stats = off
save

This is what I use to reset everything

set gyro_hardware_lpf = 256HZ
set acc_lpf_hz = 15
set heading_hold_rate_limit = 90
set stats = off
save

You can copy and paste those parameters in to the INAV CLI; to fix the changes made by the INAV random config change bug. I wouldn’t do this as a prophylactic measure. Just do this if your plane is having issues.

What do we know?

The issue seems to be prevalent on a number of flight controllers, and may goes back to and beyond INAV 2.6.1. Marc Hoffman and Darren Lines have seen it as far back as INAV 2.2. This bug may be related to the wipe bug, whereby a flight controller is reset to defaults and all settings are lost. This is a good reason why you need to save your diff all and dump files whenever you make changes. So that you can revert back to your working setup easily.

The gyro hardware LPF filter change is minor. You can fix that at the field through your OSD. The acc_lpf is the most crucial. Changes in it are not found by INAV’s boot checker. When this gets set off your plane cannot rely on the accelerometer and it can affect your barometer readings as well.

The cause of the issue is unknown. But, it seems to be caused during operations writing to the flash memory. Things that write to the flash memory on every flight are:

  1. The Odometer (stats = on)
  2. Continuous servo trim
  3. CMS (OSD menu) save 
  4. Auto-trim
  5. Save via configurator

The odometer and continuous servo trim save to the flash memory after each flight. Thus, if these are being used on a plane that is flown a lot; you’re more likely to run across this bug. Simply, the more saves, the more chance of encountering the INAV random config change bug.

What you can do to avoid the issue:

  1. Don’t use continuous servo trim
  2. Don’t use stats
  3. Run the get commands (above) to see if anything has changed on your plane from time to time
  4. Make a copy of a good, working diff all and/or dump file. You may want to revert back to it if the bug strikes; or you can try diagnosing the issue using the tools presented here.

How likely is this issue to be fixed anytime soon?

It’s an intermittent problem, not affecting a wide swath of the INAV community. Also, the cause of the issue is not understood yet. Thus, it may be an issue for some time to come. If you decide you would like to use the odometer and continuous servo trim on a plane that is flown frequently. You may want to jump into your CLI every couple of weeks to see if anything in the get commands listed above have changed.

Update: 19th March 2022

Over the last two weeks, there has been a lot of movement on this bug. Thanks to an observation by M0j0Risin, which was refined by Marc Hoffmann. The cause of this issue has been found and a fix has been put in place. The problem revolved around the MSP communications between the flight controller and configurator. Fixes have been merged now, so will be present in the next release of iNav. However, any tools that are built on the code from the Configurator (such as the SpeedyBee app) will need to make these fixes too. But, from iNav 5.0, this bug will be a thing of the past.