Files
paparazzi/conf/modules/mag_lis3mdl.xml
Gautier Hattenberger 00766ee4d5 [imu] backward compat for single imu calibration
- old airframe with single imu configuration will continue to work, ABI
id is automatically found
- mag modules require @imu to guarantee init order, multiple calls of
imu_init is no longer needed
- ABI_BROADCAST id is used by default and then replaced by correct ID
- imu_set_default_config will override user conf if params are not NULL
2022-09-20 14:37:58 +02:00

54 lines
2.6 KiB
XML

<!DOCTYPE module SYSTEM "module.dtd">
<module name="mag_lis3mdl" dir="sensors" task="sensors">
<doc>
<description>
ST LIS3MDL magnetometer.
</description>
<configure name="MAG_LIS3MDL_I2C_DEV" value="i2cX" description="I2C device to use"/>
<define name="MODULE_LIS3MDL_SYNC_SEND" value="TRUE|FALSE" description="Send IMU_RAW message with each new measurement (default: FALSE)"/>
<define name="MODULE_LIS3MDL_UPDATE_AHRS" value="TRUE|FALSE" description="Copy measurements to imu and send as ABI message (default: FALSE)"/>
<define name="LIS3MDL_CHAN_X_SIGN" value="+|-" description="Reverse polarity of x axis (default: +)"/>
<define name="LIS3MDL_CHAN_Y_SIGN" value="+|-" description="Reverse polarity of y axis (default: +)"/>
<define name="LIS3MDL_CHAN_Z_SIGN" value="+|-" description="Reverse polarity of z axis (default: +)"/>
<define name="LIS3MDL_CHAN_X" value="0|1|2" description="Channel id of x axis (default: 0)"/>
<define name="LIS3MDL_CHAN_Y" value="0|1|2" description="Channel id of y axis (default: 1)"/>
<define name="LIS3MDL_CHAN_Z" value="0|1|2" description="Channel id of z axis (default: 2)"/>
<section name="MAG_LIS3MDL" prefix="LIS3MDL_">
<define name="MAG_TO_IMU_PHI" value="0.0" description="Rotation between sensor frame and IMU frame (phi angle)"/>
<define name="MAG_TO_IMU_THETA" value="0.0" description="Rotation between sensor frame and IMU frame (theta angle)"/>
<define name="MAG_TO_IMU_PSI" value="0.0" description="Rotation between sensor frame and IMU frame (psi angle)"/>
</section>
</doc>
<dep>
<depends>i2c,@imu</depends>
<provides>mag</provides>
</dep>
<header>
<file name="mag_lis3mdl.h"/>
</header>
<init fun="mag_lis3mdl_module_init()"/>
<periodic fun="mag_lis3mdl_module_periodic()" freq="60"/>
<periodic fun="mag_lis3mdl_report()" freq="10" autorun="FALSE"/>
<event fun="mag_lis3mdl_module_event()"/>
<makefile target="ap">
<file name="mag_lis3mdl.c"/>
<file name="lis3mdl.c" dir="peripherals"/>
<raw>
ifeq ($(MAG_LIS3MDL_I2C_DEV),)
$(error mag_lis3mdl module error: please configure MAG_LIS3MDL_I2C_DEV)
endif
</raw>
<configure name="MAG_LIS3MDL_I2C_DEV" case="upper|lower"/>
<define name="USE_$(MAG_LIS3MDL_I2C_DEV_UPPER)"/>
<define name="MAG_LIS3MDL_I2C_DEV" value="$(MAG_LIS3MDL_I2C_DEV_LOWER)"/>
<test>
<define name="MAG_LIS3MDL_I2C_DEV" value="i2c1"/>
<define name="USE_I2C1"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>