AP_Logger: MessageWriter: SysInfo: write RCOut string

This commit is contained in:
Iampete1 2022-10-17 13:53:20 +01:00 committed by Andrew Tridgell
parent ab29dd8241
commit c623ae8b82
2 changed files with 15 additions and 2 deletions

View File

@ -295,7 +295,7 @@ void LoggerMessageWriter_WriteSysInfo::process() {
stage = Stage::RC_PROTOCOL; stage = Stage::RC_PROTOCOL;
FALLTHROUGH; FALLTHROUGH;
case Stage::RC_PROTOCOL: case Stage::RC_PROTOCOL: {
const char *prot = hal.rcin->protocol(); const char *prot = hal.rcin->protocol();
if (prot == nullptr) { if (prot == nullptr) {
prot = "None"; prot = "None";
@ -303,6 +303,18 @@ void LoggerMessageWriter_WriteSysInfo::process() {
if (! _logger_backend->Write_MessageF("RC Protocol: %s", prot)) { if (! _logger_backend->Write_MessageF("RC Protocol: %s", prot)) {
return; // call me again return; // call me again
} }
stage = Stage::RC_OUTPUT;
FALLTHROUGH;
}
case Stage::RC_OUTPUT: {
char banner_msg[50];
if (hal.rcout->get_output_mode_banner(banner_msg, sizeof(banner_msg))) {
if (!_logger_backend->Write_Message(banner_msg)) {
return; // call me again
}
}
break;
}
} }
_finished = true; // all done! _finished = true; // all done!

View File

@ -35,7 +35,8 @@ private:
VER, // i.e. the "VER" message VER, // i.e. the "VER" message
SYSTEM_ID, SYSTEM_ID,
PARAM_SPACE_USED, PARAM_SPACE_USED,
RC_PROTOCOL RC_PROTOCOL,
RC_OUTPUT,
}; };
Stage stage; Stage stage;
}; };