From PaparazziUAV
Revision as of 22:28, 12 June 2011 by Sergio812 (talk | contribs)

Jump to: navigation, search


Modules use code generation in order to allow people to use them by only editing the vehicle's xml configuration as opposed to changing/adding to the code of the autopilot. Typically, function calls are generated for initialisation and in the mainloop for timers (periodic in paparazzi slang) and events.

modules page


Subsystems are just a convention used to provide several implementations of a peripheral (like microcontroller peripherals, an external imu board...), protocol (gps, communications...) or algorithm (control, estimation...). Function calls are written "by hand" and the build system takes care to compile the particular implementation.


Modules naturally provide the "several implementations" feature of the Subsystems. So, ideally we could have a "generic" main.c consisting only in calls to the generated functions. This has the advantage of providing flexibility for specifying timing parameters from the xml, like for example the frequency of control or estimation algorithm.

Nevertheless, care should be taken that switching to a "module only" configuration doesn't become detrimental to the readability and debugability of the code.

Fixedwing and Rotorcraft use different gps code and we'll have to decide when we merge if we make it a module or a subsystem.