mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
Replay: pass through some message types to output log
this gives mode information in output log
This commit is contained in:
parent
7177d5df7e
commit
52f6332fa9
@ -97,6 +97,13 @@ void LogReader::maybe_install_vehicle_specific_parsers() {
|
||||
|
||||
MsgHandler_PARM *parameter_handler;
|
||||
|
||||
/*
|
||||
list of message types to be passed through to output log
|
||||
*/
|
||||
static const char *passthrough_types[] = { "MODE", "EV", "POWR", "RCIN", "RCOU", "MSG",
|
||||
"CMD", "CAM", "CURR", "SIM", "TERR", "STRT", "PM",
|
||||
"STAT", NULL };
|
||||
|
||||
bool LogReader::update(char type[5])
|
||||
{
|
||||
uint8_t hdr[3];
|
||||
@ -224,9 +231,12 @@ bool LogReader::update(char type[5])
|
||||
|
||||
MsgHandler *p = msgparser[f.type];
|
||||
if (p == NULL) {
|
||||
// I guess this wasn't as self-describing as it could have been....
|
||||
// ::printf("No format message received for type %d; ignoring message\n",
|
||||
// type);
|
||||
for (uint8_t i=0; passthrough_types[i]; i++) {
|
||||
if (strcmp(passthrough_types[i], type) == 0) {
|
||||
dataflash.WriteBlock(msg, f.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user