Plane: disable camera logging when camera support disabled

This commit is contained in:
Andrew Tridgell 2015-07-30 12:17:48 +10:00 committed by Randy Mackay
parent f6e98ff8ef
commit 2a30b1862b
1 changed files with 2 additions and 0 deletions

View File

@ -831,10 +831,12 @@ void Plane::do_take_picture()
// log_picture - log picture taken and send feedback to GCS // log_picture - log picture taken and send feedback to GCS
void Plane::log_picture() void Plane::log_picture()
{ {
#if CAMERA == ENABLED
gcs_send_message(MSG_CAMERA_FEEDBACK); gcs_send_message(MSG_CAMERA_FEEDBACK);
if (should_log(MASK_LOG_CAMERA)) { if (should_log(MASK_LOG_CAMERA)) {
DataFlash.Log_Write_Camera(ahrs, gps, current_loc); DataFlash.Log_Write_Camera(ahrs, gps, current_loc);
} }
#endif
} }
// start_command_callback - callback function called from ap-mission when it begins a new mission command // start_command_callback - callback function called from ap-mission when it begins a new mission command