ArduCopter: allow triggering of camera from a mission

This commit is contained in:
rmackay9 2012-12-06 23:48:30 +09:00
parent bfb033c52b
commit 2cff551891
2 changed files with 9 additions and 1 deletions

View File

@ -112,6 +112,7 @@ static void process_now_command()
break;
case MAV_CMD_DO_DIGICAM_CONTROL: // Mission command to control an on-board camera controller system. |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Empty|
do_take_picture();
break;
#endif
@ -915,3 +916,10 @@ static void do_nav_roi()
auto_yaw = get_bearing_cd(&current_loc, &target_WP);
#endif
}
// do_take_picture - take a picture with the camera library
static void do_take_picture()
{
g.camera.trigger_pic();
Serial.print_P(PSTR("Camera!!"));
}

View File

@ -145,7 +145,7 @@ static void read_trim_switch()
#if CAMERA == ENABLED
case CH7_CAMERA_TRIGGER:
if(ap_system.CH7_flag) {
g.camera.trigger_pic();
do_take_picture();
}
break;
#endif