Servers by jDrones

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

mavlink
pymavlink

(Ahmed Osama Mohamed Elhassan Mahgoub) #1

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 setup.py 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?

Thanks!


(Amilcar Lucas) #2

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 ?


(Ahmed Osama Mohamed Elhassan Mahgoub) #3

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.