[fix:dc] release camera button on init

This commit is contained in:
Christophe De Wagter
2012-10-13 15:17:53 +02:00
committed by Felix Ruess
parent e5f2e9fe42
commit a7146a7a0d
2 changed files with 26 additions and 18 deletions
+6 -9
View File
@@ -4,15 +4,6 @@
// Use (parts of) the following section in airframe file to change
<section name="DIGITAL_CAMERA" prefix="DC_">
<configure name="PUSH" value"LED_ON" />
<configure name="RELEASE" value"LED_OFF" />
<configure name="AUTOSHOOT_QUARTERSEC_PERIOD" value="6" unit="quarter_second"/>
<configure name="AUTOSHOOT_METER_GRID" value="50" unit="meter"/>
</section>
# ap.CFLAGS += -DGPS_TRIGGERED_FUNCTION="dc_shoot_on_gps"
# ap.CFLAGS += -DDC_GPS_TRIGGER_START=1
# ap.CFLAGS += -DDC_GPS_TRIGGER_STOP=3
@@ -24,6 +15,12 @@
<description>Digital camera control (trigger using led)</description>
<define name="DC_SHOOT_ON_BUTTON_RELEASE" />
<define name="SENSOR_SYNC_SEND" value="1" />
<define name="DC_PUSH" value="LED_ON" />
<define name="DC_RELEASE" value="LED_OFF" />
<define name="DC_AUTOSHOOT_QUARTERSEC_PERIOD" value="6" unit="quarter_second"/>
<define name="DC_AUTOSHOOT_METER_GRID" value="50" unit="meter"/>
</doc>
<header>
+20 -9
View File
@@ -52,15 +52,6 @@
extern uint8_t dc_timer;
static inline void led_cam_ctrl_init(void)
{
// Call common DC init
dc_init();
// Do LED specific DC init
dc_timer = 0;
}
#ifndef DC_PUSH
#define DC_PUSH LED_ON
#endif
@@ -77,6 +68,26 @@ static inline void led_cam_ctrl_init(void)
#error DC: Please specify at least a SHUTTER LED
#endif
static inline void led_cam_ctrl_init(void)
{
// Call common DC init
dc_init();
// Do LED specific DC init
dc_timer = 0;
DC_RELEASE(DC_SHUTTER_LED);
#ifdef DC_ZOOM_IN_LED
DC_RELEASE(DC_ZOOM_IN_LED);
#endif
#ifdef DC_ZOOM_OUT_LED
DC_RELEASE(DC_ZOOM_OUT_LED);
#endif
#ifdef DC_POWER_LED
DC_RELEASE(DC_POWER_LED);
#endif
}
/* 4Hz Periodic */
static inline void led_cam_ctrl_periodic( void )