Difference between revisions of "FirmwareArchitecture"

From PaparazziUAV
Jump to navigation Jump to search
m
Line 5: Line 5:


== Subsystems ==
== Subsystems ==
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.  
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.


[[Subsystems]]


== Discussion ==
== Discussion ==

Revision as of 05:19, 7 November 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 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.

Subsystems

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.