-
Notifications
You must be signed in to change notification settings - Fork 167
Development Modules
The current list of modules (with documentation) is:
Note: Not all modules are present in all firmware images.
Modules are included in a firmware image when it is listed in the MODULES
or OPTMODULES
list in the Makefile for the board firmware (see ./flight/targets/<board>/Makefile
).
Modules listed in the MODULES
list are called Built-in. Modules listed in the OPTMODULES
list are called Optional.
The ModuleSettings
UAVO is read by the firmware only once during board initialization. The fields in this UAVO control the behaviour of the modules included in the firmware build.
Note: This UAVO may include settings for modules that are not present in the firmware.
Note: Some modules may require additional configuration before being able to start.
Note: Changes to the ModuleSettings
UAVO only take effect on the next reboot of your board.
Optional modules are built into a firmware image but do not run by default. Optional modules only run when they are explicitly enabled in the ModuleSettings.State
UAVO field.
In many cases, an optional module will have a dedicated config tab in the GCS which will take care of enabling the module on the next boot.
Optional modules may be enabled by setting the relevant entry in the ModuleSettings.State
field to Enabled
.
Built-in modules will be started automatically during firmware initialization.
Note: Even built-in modules may requre additional configuration before being able to start.
Here is a rough outline of what you'll need to do to create a new module and add it to a firmware image:
- Create the new module directory
./flight/Modules/<module-name>
- The is typically written in CamelCase and should consist of only upper and lower-case letters.
- Create one or more .c files that implement the code for your module
./flight/Modules/<module-name>/*.c
- Find another module that you can use as a basis for your new module
- Add the new module to
./flight/targets/<board>/fw/Makefile
- Add your new module to the
MODULES
orOPTMODULES
list
- Add your new module to the
- Add an entry for your module to the
ModuleSettings
UAVO- see
./shared/uavobjectdefinition/modulesettings.xml
- module should be added to the
ModuleSettings.State
field - any module-specific settings should be added as new fields
- see
- Add your module's task (if any) to the
TaskInfo
UAVO- see
./shared/uavobjectdefinition/taskinfo.xml
- only required if your module has a task (most do)
- see