[Paparazzi-devel] unified/simplified parameter definitions for modules a
[Paparazzi-devel] unified/simplified parameter definitions for modules and subsystems
Thu, 23 Dec 2010 23:38:14 +0100
I just merged and pushed Gautier's branch that unifies and simplifies the configuration of modules and subsystems in the airframe file.
Now every "parameter" that ends up as a C preprocessor define uses the keyword define. This means that you have to change both flag and param in modules to define. For subsystems define stays define.
When you want to define a makefile variable you have to use the keyword configure now. Meaning you have to change define in modules to configure and for subsystems you have to change the old param to configure.
Here are some examples:
Formerly if you used param in a subsystem, e.g. to configure the baud rate: <subsystem name="telemetry" type="xbee_api"> <param name="MODEM_BAUD" value="B9600"/>
This becomes: <subsystem name="telemetry" type="xbee_api">
<configure name="MODEM_BAUD" value="B9600"/>
And in modules something like <modules> <load name="airspeed_adc.xml"> <define name="ADC_AIRSPEED" value="ADC_4"/>
<flag name="AIRSPEED_SCALE" value="1"/> <flag name="AIRSPEED_BIAS" value="0"/> </load> </modules>
This makes the definition of these parameters consistent and easier to understand.
There is one thing to be aware of: If your airframe files still uses some old parameter keywords (like flag and param) the targets list in the paparazzi center will not be populated because it is not a valid xml document according to the DTD anymore.