mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
8be5c426b6
Start working on #940 This replaces ```xml <depend require="foo|bar" conflict="baz"/> ``` with ```xml <depends>foo,bar</depends> <conflicts>baz</conflicts> ``` and now allows to specify OR dependencies with | (pipe) similaro to Debian depends: ```xml <depends>foo,bar,this|that</depends> ``` which would depend on: foo AND bar AND (this OR that)
65 lines
3.8 KiB
XML
65 lines
3.8 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="meteo_stick" dir="meteo">
|
|
<doc>
|
|
<description>
|
|
Meteo sensor board from Enac (absolute and differential pressure, temperature, humidity) aka Meteo Stick.
|
|
|
|
Raw meteo data:
|
|
- Pressure (absolute and differential) in ADC (ADS1220)
|
|
- Temperature in ADC (ADS1220)
|
|
- Humidity in ticks (period of the input signal)
|
|
|
|
When using SEND_MS flag, scaled pressure, temperature and humidity data are sent over telemetry with the PAYLOAD_FLOAT message (array of float).
|
|
If scale factors and offset are not specified, raw values are sent (scale=1.0, offset=0).
|
|
|
|
When using LOG_MS flag, raw pressure, temperature and humidity data are stored with raw gps data (position, speed, time, status).
|
|
Field names and units are in the first line of the log file.
|
|
</description>
|
|
<configure name="MS_SPI_DEV" value="SPIX" description="Select SPI for external ADC"/>
|
|
<configure name="MS_PRESSURE_SLAVE_IDX" value="X" description="Index of the SPI slave for absolute pressure"/>
|
|
<configure name="MS_DIFF_PRESSURE_SLAVE_IDX" value="X" description="Index of the SPI slave for differential pressure"/>
|
|
<configure name="MS_TEMPERATURE_SLAVE_IDX" value="X" description="Index of the SPI slave for temperature"/>
|
|
<configure name="MS_HUMIDITY_PWM_INPUT" value="PWM_INPUTX" description="Select PWM input channel for humidity sensor"/>
|
|
<section name="METEO_STICK">
|
|
<define name="MS_PRESSURE_OFFSET" value="0" description="Offset in ADC of the absolute pressure sensor"/>
|
|
<define name="MS_PRESSURE_SCALE" value="1." description="Scale factor of the absolute pressure sensor"/>
|
|
<define name="MS_TEMPERATURE_OFFSET" value="0" description="Offset in ADC of the temperature sensor"/>
|
|
<define name="MS_TEMPERATURE_SCALE" value="1." description="Scale factor of the temperature sensor"/>
|
|
<define name="MS_HUMIDITY_OFFSET" value="0" description="Offset in micro seconds of the humidity sensor"/>
|
|
<define name="MS_HUMIDITY_SCALE" value="1." description="Scale factor of the pressure sensor"/>
|
|
<define name="MS_DIFF_PRESSURE_OFFSET" value="0" description="Offset in ADC of the differential pressure sensor"/>
|
|
<define name="MS_DIFF_PRESSURE_SCALE" value="1." description="Scale factor of the differential pressure sensor"/>
|
|
<define name="LOG_MS" value="TRUE|FALSE" description="Log data on SD card (ascii format, raw PTU data + GPS data)"/>
|
|
<define name="SEND_MS" value="TRU|FALSE" description="Send data over telemetry (PAYLOAD_FLOAT message, scaled PTU data)"/>
|
|
</section>
|
|
</doc>
|
|
<depends>pwm_meas</depends>
|
|
<header>
|
|
<file name="meteo_stick.h"/>
|
|
</header>
|
|
<init fun="meteo_stick_init()"/>
|
|
<periodic fun="meteo_stick_periodic()" freq="10" autorun="TRUE"/>
|
|
<event fun="meteo_stick_event()"/>
|
|
<makefile target="ap">
|
|
<raw>
|
|
MS_SPI_DEV_UPPER=$(shell echo $(MS_SPI_DEV) | tr a-z A-Z)
|
|
MS_SPI_DEV_LOWER=$(shell echo $(MS_SPI_DEV) | tr A-Z a-z)
|
|
</raw>
|
|
<file name="meteo_stick.c"/>
|
|
<file name="ads1220.c" dir="peripherals"/>
|
|
<define name="USE_$(MS_SPI_DEV_UPPER)"/>
|
|
<define name="MS_PRESSURE_SLAVE_IDX" value="$(MS_PRESSURE_SLAVE_IDX)"/>
|
|
<define name="MS_DIFF_PRESSURE_SLAVE_IDX" value="$(MS_DIFF_PRESSURE_SLAVE_IDX)"/>
|
|
<define name="MS_TEMPERATURE_SLAVE_IDX" value="$(MS_TEMPERATURE_SLAVE_IDX)"/>
|
|
<define name="USE_SPI_SLAVE$(MS_PRESSURE_SLAVE_IDX)"/>
|
|
<define name="USE_SPI_SLAVE$(MS_DIFF_PRESSURE_SLAVE_IDX)"/>
|
|
<define name="USE_SPI_SLAVE$(MS_TEMPERATURE_SLAVE_IDX)"/>
|
|
<define name="MS_SPI_DEV" value="$(MS_SPI_DEV_LOWER)"/>
|
|
<define name="MS_HUMIDITY_PWM_INPUT" value="$(MS_HUMIDITY_PWM_INPUT)"/>
|
|
<define name="PWM_INPUT_TICKS_PER_USEC" value="42"/> <!-- set timer clock to 42 MHz -->
|
|
<define name="USE_$(MS_HUMIDITY_PWM_INPUT)" value="PWM_PULSE_TYPE_ACTIVE_LOW"/>
|
|
</makefile>
|
|
</module>
|
|
|