What is the running frequency for a new flight mode

Hi,

I’m trying to add a new flight mode to arducopter. For what I read online, I think the frequency for executing my new flight mode would be 400 Hz for pixhawk.

My question is how I can ensure it is running at such frequency? Do I have a switch to change it to lower frequencies if my own flight mode takes too long for execution for 400 HZ? I’m asking because the new flight mode contains a new flight controller for which the frequency must be known. I’m also using SITL to verify the frequencies first before working with a real quad.

Any suggestions would be appreciated! Thanks!

You dont have to change anything in that regard, the loop rates are set based on importance and required update rates. It should run at the required 400Hz, I think if it is not able to you’ll get other warning signs. There are some specific rate parameters to change but I wouldn’t unless instructed to do so.

What do you want to do with your new flight mode that Ardupilot cant already do?