|
|
|
@ -87,6 +87,19 @@ static const char *passthrough_types[] = { "MODE", "EV", "POWR", "RCIN", "RCOU",
@@ -87,6 +87,19 @@ static const char *passthrough_types[] = { "MODE", "EV", "POWR", "RCIN", "RCOU",
|
|
|
|
|
"CMD", "CAM", "CURR", "SIM", "TERR", "STRT", "PM",
|
|
|
|
|
"STAT", NULL }; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
see if a type is in a list of types |
|
|
|
|
*/ |
|
|
|
|
bool LogReader::in_list(const char *type, const char *list[]) |
|
|
|
|
{ |
|
|
|
|
for (uint8_t i=0; list[i] != NULL; i++) { |
|
|
|
|
if (strcmp(type, list[i]) == 0) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool LogReader::update(char type[5]) |
|
|
|
|
{ |
|
|
|
|
uint8_t hdr[3]; |
|
|
|
@ -214,11 +227,8 @@ bool LogReader::update(char type[5])
@@ -214,11 +227,8 @@ bool LogReader::update(char type[5])
|
|
|
|
|
|
|
|
|
|
MsgHandler *p = msgparser[f.type]; |
|
|
|
|
if (p == NULL) { |
|
|
|
|
for (uint8_t i=0; passthrough_types[i]; i++) { |
|
|
|
|
if (strcmp(passthrough_types[i], type) == 0) { |
|
|
|
|
if (in_list(type, passthrough_types)) { |
|
|
|
|
dataflash.WriteBlock(msg, f.length); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|