|
From: | Joseph Muhlhausen |
Subject: | Re: [Paparazzi-devel] digital_cam and GPIO on Umarim |
Date: | Sat, 13 Jun 2015 11:57:50 -0400 |
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 UmarimOk 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:Here the code if it helps someone:Hi Felix,It worked! thanks
<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.htmlCheers, 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
[Prev in Thread] | Current Thread | [Next in Thread] |