Adding new Ground Distance Sensor to APM Planner 2

Hi all,

I’m modifying a local copy of APM Planner 2 to integrate the support for a new IR sensor to get ground distance measurements.

I’m working now on the menu: Initial Setup -> Optional Setup -> Sonar ( Renamed Ground Distance Sensors )

I’m following the style of the code already done for the sonar ( modifing SonarConfig.cc to handle user signals on the added graphical components ), but I don’t know how to create my custom parameterName similar to “SONAR_ENABLE” or “SONAR_TYPE”, let say “MYSENSOR_ENABLE” and “MYSENSOR_TYPE”.

Where can I declare these new custom parameterNames ?
I found the file extra_sensors.qgw but working on it doesn’t seems to help my task.

Thanks.

Sensor names come from the APM when you download the parameter list from it.

The descriptions in the Full Parameter list come form the apm.def.xml file we download from the net

thanks billbonney for your quick and sharp answer.

I found the parameters in /ardupilot/ArduCopter/Parameters.h

I didn’t find the file apm.def.xml googling for it, could you please address me one url the get it?

thanks

it’s here autotest.diydrones.com/Parameters/apm.pdef.xml and it’s generated automatically from the apm source