Servers by jDrones

New Flight Mode not shown in Mission Planner

(Eric Oliver Schmidt) #1

Hi everyone!
I followed those steps (and ALL of it :wink:) (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 :blush:
Have a nice evening!

(Dave) #2

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).

(Mark Whitehorn) #3

@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.

(Eric Oliver Schmidt) #4

Thank you very much for your reply. Although I comitted my branch to master Mission Planner does not recognize my mode… :sob:
Do you have another idea?

(Mark Whitehorn) #5

Did you create a PR against ArduPilot, or just commit to your own fork?

(Eric Oliver Schmidt) #6

I commited to my own fork and built (and uploaded) the code on my pixracer

(Mark Whitehorn) #7

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.

1 Like
(Andras Schaffer) #8

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 :

0:Stabilize,1:Acro,2:AltHold,3:Auto,4:Guided,5:Loiter,6:RTL,7:Circle,9:Land,11:Drift,13:Sport,14:Flip,15:AutoTune,16:PosHold,17:Brake,18:Throw,19:Avoid_ADSB,20:Guided_NoGPS,21:Smart_RTL,22:FlowHold,23:Follow,24:ThisISMyNew_MODE

Restart Mission Planner.

Same for Plane, but in the ArduPlane section.

Note: it will be overwritten when you update MP.

1 Like
(Mark Whitehorn) #9

@Eosbandi Thanks, do you know how that xml file is generated?

(Andras Schaffer) #10

From the ardupilot master repository

1 Like
(Eric Oliver Schmidt) #11

@Eosbandi Thank you! :wink:

(Eric Oliver Schmidt) #12

@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?

(Andras Schaffer) #13

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.

(Eric Oliver Schmidt) #14

@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!