Skip to content

Commit

Permalink
Copter: restore mount's mode to default after ROI completes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Mar 5, 2014
1 parent 1c457d8 commit 6efc26d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ArduCopter/commands_logic.pde
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,12 @@ static void do_roi()
if (auto_yaw_mode == AUTO_YAW_ROI && (command_cond_queue.alt == 0 && command_cond_queue.lat == 0 && command_cond_queue.lng == 0)) {
// set auto yaw mode back to default assuming the active command is a waypoint command. A more sophisticated method is required to ensure we return to the proper yaw control for the active command
set_auto_yaw_mode(get_default_auto_yaw_mode(false));
// To-Do: switch off the camera tracking if enabled
#if MOUNT == ENABLED
// switch off the camera tracking if enabled
if (camera_mount.get_mode() == MAV_MOUNT_MODE_GPS_POINT) {
camera_mount.set_mode_to_default();
}
#endif // MOUNT == ENABLED
}else{
#if MOUNT == ENABLED
// check if mount type requires us to rotate the quad
Expand All @@ -683,7 +688,7 @@ static void do_roi()
// if we have no camera mount aim the quad at the location
roi_WP = pv_location_to_vector(command_cond_queue);
set_auto_yaw_mode(AUTO_YAW_ROI);
#endif
#endif // MOUNT == ENABLED
}
}

Expand Down

0 comments on commit 6efc26d

Please sign in to comment.