Skip to content

Commit

Permalink
[modules] digital_cam: Shoot on button release
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Oct 5, 2012
1 parent 60af1dc commit c39f806
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sw/airborne/modules/digital_cam/led_cam_ctrl.c
Expand Up @@ -34,7 +34,9 @@ void dc_send_command(uint8_t cmd)
{
case DC_SHOOT:
DC_PUSH(DC_SHUTTER_LED);
#ifndef DC_SHOOT_ON_BUTTON_RELEASE
dc_send_shot_position();
#endif
break;
#ifdef DC_ZOOM_IN_LED
case DC_TALLER:
Expand Down
6 changes: 6 additions & 0 deletions sw/airborne/modules/digital_cam/led_cam_ctrl.h
Expand Up @@ -81,6 +81,12 @@ static inline void led_cam_ctrl_init(void)
/* 4Hz Periodic */
static inline void led_cam_ctrl_periodic( void )
{
#ifdef DC_SHOOT_ON_BUTTON_RELEASE
if (dc_timer==1) {
dc_send_shot_position();
}
#endif

if (dc_timer) {
dc_timer--;
} else {
Expand Down
2 changes: 2 additions & 0 deletions sw/airborne/modules/digital_cam/servo_cam_ctrl.c
Expand Up @@ -33,7 +33,9 @@ void dc_send_command(uint8_t cmd)
{
case DC_SHOOT:
DC_PUSH(DC_SHUTTER_SERVO);
#ifndef DC_SHOOT_ON_BUTTON_RELEASE
dc_send_shot_position();
#endif
break;
#ifdef DC_ZOOM_IN_SERVO
case DC_TALLER:
Expand Down
6 changes: 6 additions & 0 deletions sw/airborne/modules/digital_cam/servo_cam_ctrl.h
Expand Up @@ -78,6 +78,12 @@ static inline void servo_cam_ctrl_init(void)
/* 4Hz Periodic */
static inline void servo_cam_ctrl_periodic( void )
{
#ifdef DC_SHOOT_ON_BUTTON_RELEASE
if (dc_timer==1) {
dc_send_shot_position();
}
#endif

if (dc_timer) {
dc_timer--;
} else {
Expand Down

0 comments on commit c39f806

Please sign in to comment.