AP_GPS: rename dataflash to logger
This commit is contained in:
parent
58614fd96a
commit
12c3446777
@ -133,7 +133,7 @@ const AP_Param::GroupInfo AP_GPS::var_info[] = {
|
||||
|
||||
// @Param: RAW_DATA
|
||||
// @DisplayName: Raw data logging
|
||||
// @Description: Handles logging raw data; on uBlox chips that support raw data this will log RXM messages into dataflash log; on Septentrio this will log on the equipment's SD card and when set to 2, the autopilot will try to stop logging after disarming and restart after arming
|
||||
// @Description: Handles logging raw data; on uBlox chips that support raw data this will log RXM messages into logger; on Septentrio this will log on the equipment's SD card and when set to 2, the autopilot will try to stop logging after disarming and restart after arming
|
||||
// @Values: 0:Ignore,1:Always log,2:Stop logging when disarmed (SBF only),5:Only log every five samples (uBlox only)
|
||||
// @RebootRequired: True
|
||||
// @User: Advanced
|
||||
@ -559,16 +559,16 @@ AP_GPS::GPS_Status AP_GPS::highest_supported_status(uint8_t instance) const
|
||||
return AP_GPS::GPS_OK_FIX_3D;
|
||||
}
|
||||
|
||||
bool AP_GPS::should_df_log() const
|
||||
bool AP_GPS::should_log() const
|
||||
{
|
||||
AP_Logger *instance = AP_Logger::get_singleton();
|
||||
if (instance == nullptr) {
|
||||
AP_Logger *logger = AP_Logger::get_singleton();
|
||||
if (logger == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (_log_gps_bit == (uint32_t)-1) {
|
||||
return false;
|
||||
}
|
||||
if (!instance->should_log(_log_gps_bit)) {
|
||||
if (!logger->should_log(_log_gps_bit)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -655,7 +655,7 @@ void AP_GPS::update_instance(uint8_t instance)
|
||||
}
|
||||
|
||||
if (data_should_be_logged &&
|
||||
should_df_log() &&
|
||||
should_log() &&
|
||||
!AP::ahrs().have_ekf_logging()) {
|
||||
AP::logger().Write_GPS(instance);
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ private:
|
||||
// calculate the blended state
|
||||
void calc_blended_state(void);
|
||||
|
||||
bool should_df_log() const;
|
||||
bool should_log() const;
|
||||
|
||||
// Auto configure types
|
||||
enum GPS_AUTO_CONFIG {
|
||||
|
@ -237,7 +237,7 @@ AP_GPS_SBF::parse(uint8_t temp)
|
||||
void
|
||||
AP_GPS_SBF::log_ExtEventPVTGeodetic(const msg4007 &temp)
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ void
|
||||
AP_GPS_SBP::logging_log_full_update()
|
||||
{
|
||||
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -412,7 +412,7 @@ AP_GPS_SBP::logging_log_raw_sbp(uint16_t msg_type,
|
||||
uint16_t sender_id,
|
||||
uint8_t msg_len,
|
||||
uint8_t *msg_buff) {
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ AP_GPS_SBP2::_sbp_process_message() {
|
||||
}
|
||||
|
||||
// send all messages we receive to log, even if it's an unsupported message,
|
||||
// so we can do additional post-processing from Dataflash logs.
|
||||
// so we can do additional post-processing from logs.
|
||||
// The log mask will be used to adjust or suppress logging
|
||||
logging_log_raw_sbp(parser_state.msg_type, parser_state.sender_id, parser_state.msg_len, parser_state.msg_buff);
|
||||
}
|
||||
@ -440,7 +440,7 @@ AP_GPS_SBP2::_detect(struct SBP2_detect_state &state, uint8_t data)
|
||||
void
|
||||
AP_GPS_SBP2::logging_log_full_update()
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ AP_GPS_SBP2::logging_log_raw_sbp(uint16_t msg_type,
|
||||
uint16_t sender_id,
|
||||
uint8_t msg_len,
|
||||
uint8_t *msg_buff) {
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ AP_GPS_SBP2::logging_log_raw_sbp(uint16_t msg_type,
|
||||
|
||||
void
|
||||
AP_GPS_SBP2::logging_ext_event() {
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -480,7 +480,7 @@ AP_GPS_UBLOX::read(void)
|
||||
// Private Methods /////////////////////////////////////////////////////////////
|
||||
void AP_GPS_UBLOX::log_mon_hw(void)
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
struct log_Ubx1 pkt = {
|
||||
@ -504,7 +504,7 @@ void AP_GPS_UBLOX::log_mon_hw(void)
|
||||
|
||||
void AP_GPS_UBLOX::log_mon_hw2(void)
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ void AP_GPS_UBLOX::log_mon_hw2(void)
|
||||
#if UBLOX_RXM_RAW_LOGGING
|
||||
void AP_GPS_UBLOX::log_rxm_raw(const struct ubx_rxm_raw &raw)
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -549,7 +549,7 @@ void AP_GPS_UBLOX::log_rxm_raw(const struct ubx_rxm_raw &raw)
|
||||
|
||||
void AP_GPS_UBLOX::log_rxm_rawx(const struct ubx_rxm_rawx &raw)
|
||||
{
|
||||
if (!should_df_log()) {
|
||||
if (!should_log()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -170,9 +170,9 @@ void AP_GPS_Backend::Write_AP_Logger_Log_Startup_messages() const
|
||||
AP::logger().Write_Message(buffer);
|
||||
}
|
||||
|
||||
bool AP_GPS_Backend::should_df_log() const
|
||||
bool AP_GPS_Backend::should_log() const
|
||||
{
|
||||
return gps.should_df_log();
|
||||
return gps.should_log();
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,7 +87,7 @@ protected:
|
||||
|
||||
void _detection_message(char *buffer, uint8_t buflen) const;
|
||||
|
||||
bool should_df_log() const;
|
||||
bool should_log() const;
|
||||
|
||||
/*
|
||||
set a timestamp based on arrival time on uart at current byte,
|
||||
|
Loading…
Reference in New Issue
Block a user