AP_Logger: log RC protocol each time a log is opened

This commit is contained in:
Peter Barker 2019-06-17 22:09:23 +10:00 committed by Peter Barker
parent 0963957b31
commit 7bca6d5ec0
2 changed files with 13 additions and 1 deletions

View File

@ -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!

View File

@ -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;
}; };