I did some trial builds to observe the results with or without <load name="baro_bmp.xml"/> included in the airframe file. Yes, from my level of knowledge it is rather complicated. But this information is a good help to better knowledge.
The modules makefiles are generated by an ocaml program. You can
find the result in var/<your AC>/Makefile.ac
This makefile and the one in conf/Makefile.<arch (ex:lpc21 for a
tiny)> are included in sw/airborne/Makefile, that is called by
the main makefiles (Makefile and Makefile.ac in the paparazzi
directory).
The function are called by the function modules_init, modules_event
or modules_periodic generated from the modules configuration files
and that you can find in var/<your AC>/generated/modules.h
The build system is a bit complicated, I hope I'm clear enough...
Gautier
On 19/06/2011 22:14, Helge Walle wrote:
Hi,
I want to log pressure and temperature values from my Twinstar2. I
have just bought and tested the BMP085 sensor in my Paparazzi
setup, and I get the BMP_STATUS message in the Messages tool. I
have <define name="SENSOR_SYNC_SEND"/> in my airframe file.
I have compared the BMP085 pressure readings to our local weather
station run by Bergen University, and the sensor data are close to
spot on.
I use freq="8" in baro_bmp.xml, which seems to give four
BMP_STATUS messages per second. The pressure values fluctuate a
bit, so I modified baro_bmp.c so that it averages a number of
readings before sending a message via telemetry. This improved
things a lot, and with 20 readings per averaged value I get a very
stable plot with a telemetry message approx every 5 seconds.
Perhaps averaging as much as 20 readings may not be suitable when
the BMP is used as an altimeter, due to the slow refresh rate.
With a small (but improving) C and makefile knowledge I am a bit
stuck with regards to finding where the baro_bmp.c compiling
instructions are, and which function the sensor code is called
from. Could anyone please shed some light on this?