Difference between revisions of "FirmwareArchitecture"

From PaparazziUAV
Jump to navigation Jump to search
Line 17: Line 17:


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.
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.
[[Category:Software]] [[Category:Developer_Documentation]]

Revision as of 18:00, 9 March 2011

Modules

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

Subsystems are just a convention used to provide several implementations of a a peripheral ( like microcontroller peripherals, an exteral 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.


Discussion

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.