I followed those steps (and ALL of it ) (http://ardupilot.org/dev/docs/apmcopter-adding-a-new-flight-mode.html) to add a new flight mode. In order to do this I built and uploaded the ‘ardupilot’ on my pixracer. Now my problem: Mission Planner does not show this new flight mode so it is not possible to choose it. I saw some questions about this in this forum but none of this was completely answered…
I hope to get a solution
Have a nice evening!
Wouldn’t you just assign the Mode number from your New Mode with the FLTMODEx parameter? As in the example “New Mode” is 22 so if you want Flight Mode 6 to be"New Mode" then FLTMODE6 to (22).
@verAPPelt That’s item 6 in the link you posted. MP won’t pick up the new mode till it has been merged to master.
Thank you very much for your reply. Although I comitted my branch to master Mission Planner does not recognize my mode…
Do you have another idea?
Did you create a PR against ArduPilot, or just commit to your own fork?
I commited to my own fork and built (and uploaded) the code on my pixracer
Mission Planner is only looking at ArduPilot/master, so it doesn’t see your new flight mode.
You could probably do a custom build of MP locally, but I’ve only done that for QGC and APMPlanner2. Perhaps someone with MP experience could help out here.
Go to Documents/Mission Planner folder. Look for ParameterMetaData.xml.
In the ArduCopter2 section find FLTMODE1 parameter description, add you flight mode at the end.
like this :
Restart Mission Planner.
Same for Plane, but in the ArduPlane section.
Note: it will be overwritten when you update MP.
@Eosbandi Thanks, do you know how that xml file is generated?
From the ardupilot master repository
@Eosbandi Thank you!
@Eosbandi Although the new flight mode is shown and choosable in MP, I think it is not acitivated.
The sent text on the (with send_text) is not shown in MP although I tried the same code as another flight mode in which the send_text works…
What could cause that?
Without seeing the code it is hard to tell. However if the FLTMODEx parameter is set correctly and it it not activated then it is a problem in the Flight Controller code. Test in SITL and use ::printf to print out debug messages to the console.
@Eosbandi Okay. I solved it otherwise.
But another big problem: after building and installing the (bin/)ardupilot with my own (and edited) flight modes on Pixracer, the telemetry connection only has 2-10 % connection instead of ca. 80 % using the default firmware. Do you have any idea so far, please? Tomorrow there is a test flight so it is a very big issue for me…
Have a nice evening!
@kd0aij I followed those steps in the official doc, and it can’t show up in the QGC. Could you please share the steps to make the new mode show up in QGC? Thanks!
Sorry, but it’s been several years since I last worked on QGC and I don’t recall how to do a custom build.
Try searching/asking in the AP QGC forum here: QGroundControl - ArduPilot Discourse
@kd0aij OK, thanks anyway.