mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
@@ -52,6 +52,12 @@ void dc_send_command(uint8_t cmd)
|
||||
case DC_ON:
|
||||
DC_PUSH(DC_POWER_LED);
|
||||
break;
|
||||
#endif
|
||||
#ifdef DC_POWER_OFF_LED
|
||||
case DC_OFF:
|
||||
DC_PUSH(DC_POWER_OFF_LED);
|
||||
dc_timer = DC_POWER_OFF_DELAY;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
* <define name="DC_ZOOM_IN_LED" value="7"/>
|
||||
* <define name="DC_ZOOM_OUT_LED" value="8"/>
|
||||
* <define name="DC_POWER_LED" value="9"/>
|
||||
* <define name="DC_POWER_OFF_LED" value="10"/>
|
||||
* @endverbatim
|
||||
* Related bank and pin must also be defined:
|
||||
* @verbatim
|
||||
@@ -68,6 +69,10 @@ extern uint8_t dc_timer;
|
||||
#define DC_SHUTTER_DELAY 2 /* 4Hz -> 0.5s */
|
||||
#endif
|
||||
|
||||
#ifndef DC_POWER_OFF_DELAY
|
||||
#define DC_POWER_OFF_DELAY 3
|
||||
#endif
|
||||
|
||||
#ifndef DC_SHUTTER_LED
|
||||
#error DC: Please specify at least a SHUTTER LED
|
||||
#endif
|
||||
@@ -90,6 +95,9 @@ static inline void led_cam_ctrl_init(void)
|
||||
#ifdef DC_POWER_LED
|
||||
DC_RELEASE(DC_POWER_LED);
|
||||
#endif
|
||||
#ifdef DC_POWER_OFF_LED
|
||||
DC_RELEASE(DC_POWER_OFF_LED);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +122,9 @@ static inline void led_cam_ctrl_periodic( void )
|
||||
#endif
|
||||
#ifdef DC_POWER_LED
|
||||
DC_RELEASE(DC_POWER_LED);
|
||||
#endif
|
||||
#ifdef DC_POWER_OFF_LED
|
||||
DC_RELEASE(DC_POWER_OFF_LED);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user