When I use ArduCopter 3.4.6 to test loiter, I found a serial problem
1、when you fly in althold first ,you can't swich to loiter mode.
2 、when loiter mode fly ，the copter can loiter well.
3、 when the flow quality is bad like 0,the copter will change the attitude and report EKF IMU0 ha stopped aidding.EKF IMU0 is using optflow,EKF IMU1 ha stopped aidding.EKF IMU1 is using optflow,but when the quality is good, it will work well.
4 、my parameter is
EKF2 = ENABLE
RNGSERIAL4_PROTOCOL = 9 (Lidar)
SERIAL4_BAUD = 9 (9600 baud) here I add a new reliable sonar to replace the lidar
RNGFND_TYPE = 8 (LightWareSerial)
RNGFND_SCALING = 1
RNGFND_MIN_CM = 10
RNGFND_MAX_CM = 300
5、when loiter you'll found loiter mode you can't control your copter higher,but can lower.
and I change the RNGFND_MAX_CM = 700, the Copter can change alttitude higher.but it like a altitude fence in higher alttitude .
LOG(here is my log)