mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_InertialSensor: rename dataflash to logger
This commit is contained in:
committed by
Peter Barker
parent
12c3446777
commit
3eeaa2c8df
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user