[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] possible bug in "dc.h" and some other functions

From: chris
Subject: [Paparazzi-devel] possible bug in "dc.h" and some other functions
Date: Sun, 31 May 2009 01:24:09 +0300
User-agent: Thunderbird (X11/20090409)

I would like to ask your opinion on this Pascal.
I have being trying lately to accomodate a moving digital 10 MegaPixel camera
on board my primary experimental airplane and i encountered some problems
calling the digital camera and camera positioning functions.
In the file "dc.h" it is described that :
"dc_Periodic(s) activates a periodic call to dc_Shutter() every s seconds"
Wel this does not work because i found that the flight plan expects a function to return 0
if everything went ok but a definition like the one inside "dc.h":
"#define dc_Periodic(s) { dc_periodic_shutter = s; dc_shutter_timer = s; }"
does not return anything and the flight plan halts.
What i did was to either set the two variables inside the flight plan using:
<set value="0" var="dc_periodic_shutter"/>
<set value="0" var="dc_shutter_timer"/>

I also tried another approach which i think is the correct one as i don't like
exposed variables and edited the "dc.h" file
in order to include a function rather than a definition of the "dc_Periodic(s)"

#define DC_Periodic(s) { _dc_Periodic(s); } //calls the static function _dc_Periodic()

static inline uint8_t  _dc_Periodic(uint8_t s)
dc_periodic_shutter = s;
dc_shutter_timer = s;


What do you think, am i doing something wrong?
I have seen the same thing happening to other functions also so i guess that before i start editing the files i better ask you first.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]