paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] take photos BY dc_shutter


From: pascal . brisset
Subject: Re: [Paparazzi-devel] take photos BY dc_shutter
Date: Tue, 15 Apr 2008 22:05:13 +0200
User-agent: Internet Messaging Program (IMP) 3.2.8

Hi,

as described in
   http://paparazzi.enac.fr/wiki/index.php/Flight_Plans#Blocks
you can add a "pre_call" and a "post_call" attributes in each block.
 For your need, you could write something like

<block name="survey NS" strip_button="Survey NS"
            pre_call="{ static int t=0; t++; if (! (t%12)) dc_shutter(); }"
>
  <survey_rectangle grid="100" wp1="S1" wp2="S2"/>
</block>

and, since the navigation control is called at 4Hz, dc_shutter() will called
every 3s.

Hope this helps

--Pascal

PS: Tested in simulation with
#include "stdio.h"
in the <header> and
<block name="Survey S1-S2" strip_button="Survey (wp S1-S2)"
strip_icon="survey.png" pre_call="{static int t=0; t++; if (! (t % 12)) {
printf(\"coucou\n\"); fflush(stdout); }}">
to get a periodic print on the standard output

Quoting address@hidden:

>
>
>
>
> Hi everybody,
>     I am planning to take photos every 3 seconds while flying "S" routine,
> how can I do this? The code to fly "S" routine is like this :
>
>    <block name="survey NS" strip_button="Survey NS">
>
>       <survey_rectangle grid="100" wp1="S1" wp2="S2"/>
>
>     </block>
>
> The code to take photos is like this :
>    <block name="dc_shutter_auto">
>       <while cond="TRUE">
>         <circle radius="nav_radius" wp="S1" until="stage_time>3"/>
>         <call fun="dc_shutter()"/>
>       </while>
>     </block>
>
> How can I combine the codes together to achieve my goal? Thank you very much.






reply via email to

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