New flight mode not shown in MAVLink modes list (SITL)

Hello Ardupilot community!

I have added a new flight mode to Copter, and I wanted to test it using SITL. However, although the code complied and SITL started, I couldn’t see my new mode in the modes list. I looked it up in the internet and I found many solutions… I tried to run
python build install --user
But it didn’t work. I also tried modifying mavlink/ardupilotmega.xml, and added manually the new flight mode, but still, it doesn’t appear in the modes’ list of MAVLink.
Using mode #no of new mode also didn’t work.
So what could be the issue?


You need to change both pymavlink, ardupilot and Mavlink.
I plan to do a code change that allows you to only change Mavlink. But you still need to recompile pymavlink and ardupilot. Would that be OK for you ?

By changing Mavlink, are you referring to editing the file ardupilotomega.xml?
I think that would be extremely useful. Just recompiling is simpler than changing the code, and would help a lot. So yeah, I guess this will be OK.