mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:42:47 +08:00
[fix:dc] release camera button on init
This commit is contained in:
committed by
Felix Ruess
parent
e5f2e9fe42
commit
a7146a7a0d
@@ -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>
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user