mirror of https://github.com/ArduPilot/ardupilot
ArduCopter: allow triggering of camera from a mission
This commit is contained in:
parent
bfb033c52b
commit
2cff551891
|
@ -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(¤t_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!!"));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue