Crash: high Altitude P gain spike at flight mode change


This was done on 3.6-rc1:

I had a crash that was mainly caused by incorrectly configured ESC. This caused motor to stall, if PWM went from 1500us -> +1950 in a single update cycle. However I have flied almost hundred hours with that setting until this crash happened.

This huge output power demand was caused by EXTREMELY high P gain spike in moment where Auto mode was changed to AltHold mode. Right after that moment one of the four motors stalled (stopped) and drone came down.

Although this could have been avoided by correctly configured ESC. I think that this P gain spike is unwanted behavior and thus its a bug.

Please see LOG.