AP_InertialSensor: rename dataflash to logger

This commit is contained in:
Tom Pittenger
2019-03-28 16:40:57 +11:00
committed by Peter Barker
parent 12c3446777
commit 3eeaa2c8df
2 changed files with 16 additions and 16 deletions
+7 -7
View File
@@ -176,8 +176,8 @@ void AP_InertialSensor::BatchSampler::push_data_to_log()
// avoid flooding AP_Logger's buffer
return;
}
AP_Logger *dataflash = AP_Logger::get_singleton();
if (dataflash == nullptr) {
AP_Logger *logger = AP_Logger::get_singleton();
if (logger == nullptr) {
// should not have been called
return;
}
@@ -199,7 +199,7 @@ void AP_InertialSensor::BatchSampler::push_data_to_log()
}
break;
}
if (!dataflash->Write_ISBH(isb_seqnum,
if (!logger->Write_ISBH(isb_seqnum,
type,
instance,
multiplier,
@@ -212,7 +212,7 @@ void AP_InertialSensor::BatchSampler::push_data_to_log()
isbh_sent = true;
}
// pack and send a data packet:
if (!dataflash->Write_ISBD(isb_seqnum,
if (!logger->Write_ISBD(isb_seqnum,
data_read_offset/samples_per_msg,
&data_x[data_read_offset],
&data_y[data_read_offset],
@@ -250,12 +250,12 @@ bool AP_InertialSensor::BatchSampler::should_log(uint8_t _instance, IMU_SENSOR_T
if (data_write_offset >= _required_count) {
return false;
}
AP_Logger *dataflash = AP_Logger::get_singleton();
if (dataflash == nullptr) {
AP_Logger *logger = AP_Logger::get_singleton();
if (logger == nullptr) {
return false;
}
#define MASK_LOG_ANY 0xFFFF
if (!dataflash->should_log(MASK_LOG_ANY)) {
if (!logger->should_log(MASK_LOG_ANY)) {
return false;
}
return true;