Browse Source

AP_Logger: log RC protocol each time a log is opened

master
Peter Barker 6 years ago committed by Peter Barker
parent
commit
7bca6d5ec0
  1. 11
      libraries/AP_Logger/LoggerMessageWriter.cpp
  2. 3
      libraries/AP_Logger/LoggerMessageWriter.h

11
libraries/AP_Logger/LoggerMessageWriter.cpp

@ -181,6 +181,17 @@ void LoggerMessageWriter_WriteSysInfo::process() {
return; // call me again return; // call me again
} }
} }
stage = ws_blockwriter_stage_rc_protocol;
FALLTHROUGH;
case ws_blockwriter_stage_rc_protocol:
const char *prot = hal.rcin->protocol();
if (prot == nullptr) {
prot = "None";
}
if (! _logger_backend->Write_MessageF("RC Protocol: %s", prot)) {
return; // call me again
}
} }
_finished = true; // all done! _finished = true; // all done!

3
libraries/AP_Logger/LoggerMessageWriter.h

@ -30,7 +30,8 @@ private:
ws_blockwriter_stage_formats = 0, ws_blockwriter_stage_formats = 0,
ws_blockwriter_stage_firmware_string, ws_blockwriter_stage_firmware_string,
ws_blockwriter_stage_git_versions, ws_blockwriter_stage_git_versions,
ws_blockwriter_stage_system_id ws_blockwriter_stage_system_id,
ws_blockwriter_stage_rc_protocol
}; };
write_sysinfo_blockwriter_stage stage; write_sysinfo_blockwriter_stage stage;
}; };

Loading…
Cancel
Save