Mode Change causes sudden drop in Altitude (Solved)

I have noticed that whenever I change from Stab to Alt Hold or Loiter (only the 2 I have setup at the moment) the copter drops up to 5m before it recovers.
As I am testing I am usually below 5m in height so it hits the ground :unamused: but as the frame is a Hiro it has caused no damage.

Flight controller is a PixFalcon.
New build currently setting up, had autotune enabled for Yaw but it was a little too breezy to accomplish.

If I got above 5m then it would catch itself and go back up to altitude.

When battery failsafe was triggered it also dropped, hit the ground, then proceeded to wind up and hop, until it turned over.
Was unresponsive to disarm and mode change during this.

log.bin

My first guess would be your motors are not set up properly, as far as how much throttle they need.
For the landing issue, I’ve always had trouble w/ the copter auto landing under anything but ideal conditions… so I’m not going to comment on that… But for the hovering/altitude change…
3.4 is much more picky about the minimum throttle and mid throttle settings.
Shoot, I can’t look at a settings list w/out a copter attached, and can’t do that now…

Look for, I think, thr_min, and thr_mid, and there are a couple motor settings about the battery min and max voltage that should be set. I think mot_thst min and max.

I had already adjusted thr_mid to 460 from 500 as the quad is a little over propped .

I had not looked at the thr_min so I will have a look at that.

Currently reloading the firmware clean and doing a total recalibration to see if anything there was screwed up.

You have your buzzer near the FC? I read some reports that was the cause if you want to try to move it if thr calibration not solve.it.

Thanks for testing. I’ve had a look at the logs and the sudden drop when switching modes is very strange. I think there must be a bug in our takeoff code. I’m not sure exactly where it is but I see a small difference in how the take-off is handled in AltHold vs Loiter.

It’s quite clear that something is going wrong when you switch from AltHold to Loiter because the throttle sent to the motors instantly drops to zero even though RC3 is staying at 1550.

I’ll look into this asap.

By the way, I think your THR_MID should be much lower, perhaps 300. It’s a little difficult to tell because I find it hard to see where in the logs it’s flying and when is it just sitting on the ground with the throttle raised.

Thanks for your valuable time Randy and sorry for wasting it.

It seems the problem was me.
I have just started using QGroundCOntrol for the PixFalcon and PixRacer
When reloading the firmware I paid a bit more attention this time, at which point I realised I might have loaded the Ardupilot stack by mistake, instead of the PX4 Flight Stack.

So I loaded new PX4 firmware, 3.4-rc1, recalibrate everything from scratch, which I had to do anyway.

The end result is it flies on rails.
It is rock solid in the air, very responsive with no overshoot or ringing when jabbed.
Switching from Stab to AltHold and Loiter produced NO movement, in any direction.

Have not pushed it to battery failsafe yet but I am sure it will respond solidly.
Sorry about the premature posting, I will investigate more deeply next time.

Log of Last flight