Baro module calling internal barometer functions for boards supporting them
No detailed description...
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
<module name="baro_board_common">
b'<configure name="USE_BARO_BOARD" value="FALSE|TRUE" />\n '
</module>
Module configuration options
Configure Options
- name:
USE_BARO_BOARD
value: FALSE|TRUE
Description: enable or not the internal baro driver (default TRUE)
Module functions
Init Functions
These initialization functions are called once on startup.
Event Functions
These event functions are called in each cycle of the module event loop.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- baro_board_periodic()
- Frequency in Hz: BARO_PERIODIC_FREQUENCY
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw baro_board_common.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_board_common" dir="sensors" task="sensors">
<doc>
<description>
Baro module calling internal barometer functions for boards supporting them
</description>
<configure name="USE_BARO_BOARD" value="FALSE|TRUE" description="enable or not the internal baro driver (default TRUE)"/>
</doc>
<dep>
<provides>baro</provides>
</dep>
<header>
<file name="baro_board_common.h"/>
</header>
<init fun="baro_board_init()"/>
<periodic fun="baro_board_periodic()" freq="BARO_PERIODIC_FREQUENCY"/>
<event fun="baro_board_event()"/>
<makefile target="ap">
<configure name="USE_BARO_BOARD" default="TRUE"/>
<configure name="BARO_LED" default="none"/>
<configure name="BARO_PERIODIC_FREQUENCY" default="50"/>
<define name="BARO_LED" value="$(BARO_LED)" cond="ifneq ($(BARO_LED),none)"/>
<define name="BARO_PERIODIC_FREQUENCY" value="$(BARO_PERIODIC_FREQUENCY)"/>
<file name="baro_board_common.c"/>
</makefile>
</module>