mirror of https://github.com/ArduPilot/ardupilot
AP_Camera: rename dataflash to logger
This commit is contained in:
parent
cc88e65fc3
commit
58614fd96a
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue