Files
paparazzi/conf/modules/airspeed_sdp3x.xml
T
Gautier Hattenberger 494e3f3ad9 [tests] add a compilation test node to modules (#2653)
When adding a test node to a makefile section, with required compilation
flags, include and other options, all the files (not arch dependent
files) can be compiled with a TAP compatible program, included in the
standard tests of the CI servers.
Not all module's XML files are converted, but a large part of the most
important parts are already covered. More will be added later. The
number of tested airframes (full compilation of all targets) have been
reduced to speed the CI compile time but still covers the relevant
architecture and boards.
The main benefit is that the overall coverage is already better than
before as previous test aircraft were compiling more or less the same
part of the airborne code, while this new mechanism is more efficient to
test modules not included in any config.
2021-02-08 17:24:19 +01:00

53 lines
3.1 KiB
XML

<!DOCTYPE module SYSTEM "module.dtd">
<module name="airspeed_sdp3x" dir="sensors">
<doc>
<description>
SDP3X differential pressure sensor for e.g measuring airspeed.
</description>
<define name="SDP3X_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c2)"/>
<define name="SDP3X_I2C_ADDR" value="0x50" description="i2c slave address (default: 0x50)"/>
<define name="SDP3X_SYNC_SEND" value="TRUE|FALSE" description="flag to enable sending every new measurement via telemetry (default:FALSE)"/>
<define name="SDP3X_PRESSURE_SCALE" value="1.0" description="pressure scaling factor to convert raw output to Pa (default: set according to pressure range and output type according to datasheet)"/>
<define name="SDP3X_PRESSURE_OFFSET" value="0.0" description="pressure offset in Pa (default: set according to pressure range and output type according to datasheet)"/>
<define name="SDP3X_AIRSPEED_SCALE" value="1.6327" description="quadratic scale factor to convert differential pressure to airspeed"/>
<define name="SDP3X_LOWPASS_TAU" value="0.15" description="Time constant for second order Butterworth low pass filter, cut-off freq of 1/(2*pi*tau) ~= 1Hz"/>
<define name="USE_AIRSPEED_SDP3X" value="TRUE|FALSE" description="Set airspeed in state interface for this sensor"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="SDP3X">
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="sdp3x.sync_send" type="bool" shortname="sync_send" module="modules/sensors/airspeed_sdp3x" param="SDP3X_SYNC_SEND" persistent="true"/>
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="sdp3x.autoset_offset" type="bool" shortname="autoset offset"/>
<dl_setting min="1.0" max="300." step="1." var="sdp3x.pressure_scale" type="float" shortname="PressScale" module="modules/sensors/airspeed_sdp3x" param="SDP3X_PRESSURE_SCALE" persistent="true"/>
<dl_setting min="-100." max="100.0" step="0.1" var="sdp3x.pressure_offset" type="float" shortname="PressOffset" module="modules/sensors/airspeed_sdp3x" param="SDP3X_PRESSURE_OFFSET" persistent="true"/>
<dl_setting min="1.0" max="2.0" step="0.01" var="sdp3x.airspeed_scale" type="float" shortname="AirScale" module="modules/sensors/airspeed_sdp3x" param="SDP3X_AIRSPEED_SCALE" persistent="true"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="airspeed_sdp3x.h"/>
</header>
<init fun="sdp3x_init()"/>
<periodic fun="sdp3x_periodic()" freq="100."/>
<event fun="sdp3x_event()"/>
<makefile target="ap">
<configure name="SDP3X_I2C_DEV" default="i2c2" case="upper|lower"/>
<define name="USE_$(SDP3X_I2C_DEV_UPPER)"/>
<define name="SDP3X_I2C_DEV" value="$(SDP3X_I2C_DEV_LOWER)"/>
<file name="airspeed_sdp3x.c"/>
<test>
<define name="SDP3X_PERIODIC_PERIOD" value="0.001"/>
<define name="SDP3X_I2C_DEV" value="i2c2"/>
<define name="USE_I2C2"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>