paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] digital_cam and GPIO on Umarim


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] digital_cam and GPIO on Umarim
Date: Sun, 14 Jun 2015 10:06:24 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi,

Since last version, we have harmonized the GPIO names (based on the stm32), so there is a macro:
GPIOA = BANK0
GPIOB = BANK1

Gautier

Le 13/06/2015 17:57, Joseph Muhlhausen a écrit :
Hi Eduardo,

Thanks a lot! it works now with <define name="DC_SHUTTER_GPIO" value="GPIOA,GPIO10"/>

How do you know  the bank name? On the schematic https://wiki.paparazziuav.org/w/images/e/ef/UmarimLite_v2_Schematic.png
I see either BANK 0 or 1 and you set it to BANK A.

Thanks,
Joseph

On Sat, Jun 13, 2015 at 11:28 AM, Eduardo lavratti <address@hidden> wrote:
I am using this pin on mine Umarin

<define name="DC_SHUTTER_GPIO" value="GPIOA,GPIO15"/>       


Date: Sat, 13 Jun 2015 11:22:14 -0400
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] digital_cam and GPIO on Umarim


Ok I was partly wrong the code compiles but does not trigger the camera. Should I declare the GPIO the same way I was declaring the LED?

<target name="ap" board="umarim_lite_2.0">
    <!--camera trigger LED-->
    <define name="USE_LED_3" value="1"/>
          <define name="LED_3_BANK" value="0"/>
          <define name="LED_3_PIN" value="10"/>
    </target>


To:

<target name="ap" board="umarim_lite_2.0">
    <!--camera trigger GPIO-->
    <define name="USE_GPIO_3" value="1"/>
          <define name="GPIO_3_BANK" value="0"/>
          <define name="GPIO_3_PIN" value="10"/>
    </target>


On Wed, Jun 10, 2015 at 3:10 PM, Joseph Muhlhausen <address@hidden> wrote:
Hi Felix,

It worked! thanks

Here the code if it helps someone:

<load name="digital_cam.xml">
      <define name="DC_SHUTTER_GPIO" value="GPIO0,GPIO10"/>
      <define name="DC_PUSH" value="gpio_set" />
      <define name="DC_RELEASE" value="gpio_clear" />
      <define name="DC_AUTOSHOOT_QUARTERSEC_PERIOD" value="4" />
      <define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="30" />
      <define name="DC_AUTOSHOOT_SURVEY_INTERVAL" value="30" />
   </load>


On Wed, Jun 10, 2015 at 1:42 PM, Felix Ruess <address@hidden> wrote:

Hi Joseph,

You have to provide the gpio bank and pin for the shutter gpio.
See also the generated docs:
http://docs.paparazziuav.org/v5.4/module__digital_cam.html

Cheers, Felix

Am 10.06.2015 19:29 schrieb "Joseph Muhlhausen" <address@hidden>:
I am moving from v5.0 to v5.4 and I am having some trouble with the digital_cam module.

I went from:

<target name="ap" board="umarim_lite_2.0">
    <!--camera trigger LED-->
    <define name="USE_LED_3" value="1"/>
          <define name="LED_3_BANK" value="0"/>
          <define name="LED_3_PIN" value="10"/>
    </target>

<modules>
    <load name="digital_cam.xml">
      <define name="DC_SHUTTER_LED" value="3"/>
   </load>
</modules>

 <section name="DIGITAL_CAMERA" prefix="DC_">
    <define name="RELEASE" value="LED_ON"/>
    <define name="PUSH" value="LED_OFF"/>
    <define name="AUTOSHOOT_QUARTERSEC_PERIOD" value="4" unit="quarter_second"/>
    <define name="AUTOSHOOT_METER_GRID" value="30" unit="meter"/>
    <!--define name="AUTOSHOOT_GPS_DIST" value="30" unit="m"/!-->
  </section>


to:

<modules>
    <load name="digital_cam.xml">
      <define name="DC_SHUTTER_GPIO" value="GPIO4"/>
      <define name="DC_PUSH" value="gpio_set" />
      <define name="DC_RELEASE" value="gpio_clear" />
      <define name="DC_AUTOSHOOT_QUARTERSEC_PERIOD" value="6" />
      <define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" />
      <define name="DC_AUTOSHOOT_SURVEY_INTERVAL" value="50" />
   </load>
</modules>


but I get the following error:

modules/digital_cam/gpio_cam_ctrl.c: In function 'gpio_cam_ctrl_init':
modules/digital_cam/gpio_cam_ctrl.c:79:3: error: too few arguments to function 'gpio_setup_output'
   gpio_setup_output(DC_SHUTTER_GPIO);
   ^
In file included from ./mcu_periph/gpio.h:41:0,
                 from modules/digital_cam/gpio_cam_ctrl.c:42:
/home/cgs/paparazzi/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h:76:20: note: declared here
 static inline void gpio_setup_output(uint32_t port, uint32_t gpios)
                    ^
<command-line>:0:12: error: too few arguments to function 'gpio_clear'
modules/digital_cam/gpio_cam_ctrl.c:80:3: note: in expansion of macro 'DC_RELEASE'
   DC_RELEASE(DC_SHUTTER_GPIO);
   ^
In file included from ./mcu_periph/gpio.h:41:0,
                 from modules/digital_cam/gpio_cam_ctrl.c:42:
/home/cgs/paparazzi/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h:118:20: note: declared here
 static inline void gpio_clear(uint32_t port, uint32_t gpios)
                    ^
modules/digital_cam/gpio_cam_ctrl.c: In function 'gpio_cam_ctrl_periodic':
<command-line>:0:12: error: too few arguments to function 'gpio_clear'
modules/digital_cam/gpio_cam_ctrl.c:110:5: note: in expansion of macro 'DC_RELEASE'
     DC_RELEASE(DC_SHUTTER_GPIO);
     ^
In file included from ./mcu_periph/gpio.h:41:0,
                 from modules/digital_cam/gpio_cam_ctrl.c:42:
/home/cgs/paparazzi/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h:118:20: note: declared here
 static inline void gpio_clear(uint32_t port, uint32_t gpios)
                    ^
modules/digital_cam/gpio_cam_ctrl.c: In function 'dc_send_command':
<command-line>:0:9: error: too few arguments to function 'gpio_set'
modules/digital_cam/gpio_cam_ctrl.c:135:7: note: in expansion of macro 'DC_PUSH'
       DC_PUSH(DC_SHUTTER_GPIO);
       ^
In file included from ./mcu_periph/gpio.h:41:0,
                 from modules/digital_cam/gpio_cam_ctrl.c:42:
/home/cgs/paparazzi/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h:104:20: note: declared here
 static inline void gpio_set(uint32_t port, uint32_t gpios)
                    ^
make[1]: *** [/home/cgs/paparazzi/var/aircrafts/ZII_V54/ap/modules/digital_cam/gpio_cam_ctrl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/cgs/paparazzi/sw/airborne'
make: *** [ap.compile] Error 2
make: Leaving directory `/home/cgs/paparazzi'

FAILED 'make -C /home/cgs/paparazzi -f Makefile.ac AIRCRAFT=ZII_V54 ap.compile' with code 2


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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