APM_Control: rename dataflash to logger

This commit is contained in:
Tom Pittenger 2019-02-11 00:34:15 -08:00 committed by Peter Barker
parent 679ccb95bf
commit 0a95785ff0

View File

@ -266,8 +266,8 @@ void AP_AutoTune::check_save(void)
*/
void AP_AutoTune::log_param_change(float v, const char *suffix)
{
AP_Logger *dataflash = AP_Logger::get_singleton();
if (!dataflash->logging_started()) {
AP_Logger *logger = AP_Logger::get_singleton();
if (!logger->logging_started()) {
return;
}
char key[AP_MAX_NAME_SIZE+1];
@ -279,7 +279,7 @@ void AP_AutoTune::log_param_change(float v, const char *suffix)
strncpy(&key[9], suffix, AP_MAX_NAME_SIZE-9);
}
key[AP_MAX_NAME_SIZE] = 0;
dataflash->Write_Parameter(key, v);
logger->Write_Parameter(key, v);
}
/*
@ -327,8 +327,8 @@ void AP_AutoTune::save_gains(const ATGains &v)
void AP_AutoTune::write_log(float servo, float demanded, float achieved)
{
AP_Logger *dataflash = AP_Logger::get_singleton();
if (!dataflash->logging_started()) {
AP_Logger *logger = AP_Logger::get_singleton();
if (!logger->logging_started()) {
return;
}
@ -342,5 +342,5 @@ void AP_AutoTune::write_log(float servo, float demanded, float achieved)
achieved : achieved,
P : current.P.get()
};
dataflash->WriteBlock(&pkt, sizeof(pkt));
logger->WriteBlock(&pkt, sizeof(pkt));
}