Creating a new flight mode in arducopter

Hi,
I’m currently trying to create a new flight mode to better understand how the overall algorithm works. So I followed the instruction from this new flight mode page.
But I have been getting few errors as shown below.

In file included from …/…/ArduCopter/mode_throw.cpp:1:
…/…/ArduCopter/Copter.h:1031:5: error: ‘ModeSpiral’ does not name a type
1031 | ModeSpiral mode_spiral;
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.


Link to my repo : Github - Sarath/Ardupilot

Any suggestions on how to proceed with my new flight mode would be helpful! Thank you in advance!!!

Hi @sasoka

Maybe this link is not that up to date, but it may help you in your debug:

https://ardupilot.org/dev/docs/apmcopter-adding-a-new-flight-mode.html

1 Like

Thank you @BrunoBagarini.
I have resolved the above issue. Wrote #endif at wrong place. Now, I’m able to build firmware, but I’m facing a new set of issues. I’m not able to install it to the flight controller. Need to look into that.

3 Likes

Nice man, keep pushing!

1 Like