Optical Flow OF.Qual always at 255

After several great test flights today using dual GPS blending, and Optical flow, I had one last flight as the sun had almost set…

In this last flight (log attached) horizontal movement in position hold would cause the copter to rapidly loose altitude.

I’ve noticed that OF.Qual is now always at 255, and previously this would fluctuate a little during the flight depending on the terrain. In very low light (as this flight was) I would have expected it to be around zero…

Am I off-base in thinking that these two things are related?

I’m running AC3.5 RC9

2017-07-05 21-59-11.zip (2.7 MB)

Notice that GPS, Baro and rangefinder all report that the copter is descending, but CTUN.Alt shows a climb.

This only started happening when the light had faded hence why I’m suspicious of optical flow.

Vibrations are extremely low so don’t think that is a cause.

Here is a video of it happening…

Using the reccomended KLT firmware from the link in the arducopter docs, opt_qua is pegged at 255 even with the lens cap on.

As a test, I’ve just tried flashing the standard PX4flow firmware that comes with QGroundControl.
With this firmware, opt_qua varies between 0 and 255 depending on the surface as expected.

Could someone with a px4flow let me know what the expected behaviour is?

Thanks in advance.