Files
paparazzi/conf/modules/airspeed_ms45xx_i2c.xml
Freek van Tienen 2a9887a747 [chibios] Update and add Pixhawk 6X autopilot (#3254)
* [chibios] Update chibios and add Pixhawk 6X autopilot

* [conf] Change rotating wing 25kg

* [modules] Fix chibios sdlogger dependency on ADC

* [modules] Fix eff scheduling rotating wing warnings

* [chibios] Cleanup and fixes
2024-05-24 15:35:04 +02:00

61 lines
3.4 KiB
XML

<!DOCTYPE module SYSTEM "module.dtd">
<module name="airspeed_ms45xx_i2c" dir="sensors" task="sensors">
<doc>
<description>
MS45XX differential or gauge type of pressure sensor for e.g measuring airspeed.
This sensor module is using the MS45xxDO digital pressure sensor with readings via I2C.
Needs to be a versions with 14bit pressure and 11bit temperature data output.
If the airspeed reading is badly calibrated, use the MS45XX_PRESSURE_SCALE to compensate.
Use the MS45XX_AIRSPEED_SCALE only to change air density.
</description>
<define name="MS45XX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c2)"/>
<define name="MS45XX_I2C_ADDR" value="0x50" description="i2c slave address (default: 0x50)"/>
<define name="MS45XX_PRESSURE_TYPE" value="0|1" description="Pressure Differential or Gauge, default is Differential"/>
<define name="MS45XX_PRESSURE_RANGE" value="1|2|4|5|10|15|20|30|50|100|150" description="pressure range in psi (default: 1)"/>
<define name="MS45XX_OUTPUT_TYPE" value="0|1" description="set to 0 for output type A, to 1 for output type B (default: type A)"/>
<define name="MS45XX_PRESSURE_SCALE" value="1.05" description="pressure scaling factor to convert raw output to Pa (default: set according to pressure range and output type according to datasheet)"/>
<define name="MS45XX_PRESSURE_OFFSET" value="8618.4" description="pressure offset in Pa (default: set according to pressure range and output type according to datasheet)"/>
<define name="MS45XX_LOWPASS_TAU" value="0.15" description="Time constant for second order Butterworth low pass filter"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="MS45XX">
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="ms45xx.autoset_offset" type="bool" shortname="autoset offset" module="modules/sensors/airspeed_ms45xx_i2c" persistent="true"/>
<dl_setting min="0.9" max="1.2" step="0.01" var="ms45xx.pressure_scale" type="float" shortname="PressScale" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_PRESSURE_SCALE" persistent="true"/>
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="ms45xx.pressure_type" type="bool" shortname="Type G" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_PRESSURE_TYPE" persistent="true"/>
<dl_setting min="8300.0" max="8900.0" step="0.1" var="ms45xx.pressure_offset" type="float" shortname="PressOffset" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_PRESSURE_OFFSET" persistent="true"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>i2c</depends>
<provides>airspeed</provides>
</dep>
<header>
<file name="airspeed_ms45xx_i2c.h"/>
</header>
<init fun="ms45xx_i2c_init()"/>
<periodic fun="ms45xx_i2c_periodic()" freq="100."/>
<event fun="ms45xx_i2c_event()"/>
<makefile target="ap">
<configure name="MS45XX_I2C_DEV" default="i2c2" case="lower|upper"/>
<define name="MS45XX_I2C_DEV" value="$(MS45XX_I2C_DEV_LOWER)"/>
<define name="USE_$(MS45XX_I2C_DEV_UPPER)"/>
<file name="airspeed_ms45xx_i2c.c"/>
<test>
<define name="MS45XX_I2C_PERIODIC_PERIOD" value="0.001"/>
<define name="USE_I2C2"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>