Difference between revisions of "FirmwareArchitecture"
Line 1: | Line 1: | ||
== 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 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 | 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. | 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. | ||
Revision as of 06:49, 16 December 2010
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.
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.
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.