diff --git a/libraries/AP_Camera/AP_Camera.cpp b/libraries/AP_Camera/AP_Camera.cpp index 942a9e7f93..da624a3676 100644 --- a/libraries/AP_Camera/AP_Camera.cpp +++ b/libraries/AP_Camera/AP_Camera.cpp @@ -392,18 +392,18 @@ void AP_Camera::setup_feedback_callback(void) // log_picture - log picture taken and send feedback to GCS void AP_Camera::log_picture() { - AP_Logger *df = AP_Logger::get_singleton(); - if (df == nullptr) { + AP_Logger *logger = AP_Logger::get_singleton(); + if (logger == nullptr) { return; } if (!using_feedback_pin()) { gcs().send_message(MSG_CAMERA_FEEDBACK); - if (df->should_log(log_camera_bit)) { - df->Write_Camera(ahrs, current_loc); + if (logger->should_log(log_camera_bit)) { + logger->Write_Camera(ahrs, current_loc); } } else { - if (df->should_log(log_camera_bit)) { - df->Write_Trigger(ahrs, current_loc); + if (logger->should_log(log_camera_bit)) { + logger->Write_Trigger(ahrs, current_loc); } } } @@ -439,12 +439,12 @@ void AP_Camera::update_trigger() _camera_trigger_logged = _camera_trigger_count; gcs().send_message(MSG_CAMERA_FEEDBACK); - AP_Logger *df = AP_Logger::get_singleton(); - if (df != nullptr) { - if (df->should_log(log_camera_bit)) { + AP_Logger *logger = AP_Logger::get_singleton(); + if (logger != nullptr) { + if (logger->should_log(log_camera_bit)) { uint32_t tdiff = AP_HAL::micros() - timestamp32; uint64_t timestamp = AP_HAL::micros64(); - df->Write_Camera(ahrs, current_loc, timestamp - tdiff); + logger->Write_Camera(ahrs, current_loc, timestamp - tdiff); } } }