|
|
@ -109,12 +109,12 @@ def build_header(): |
|
|
|
h += "#include <map>\n" |
|
|
|
h += "#include <map>\n" |
|
|
|
h += "#include <string>\n" |
|
|
|
h += "#include <string>\n" |
|
|
|
|
|
|
|
|
|
|
|
h += "struct service { std::string name; bool should_log; int frequency; int decimation; };\n" |
|
|
|
h += "struct service { std::string name; bool should_log; float frequency; int decimation; };\n" |
|
|
|
h += "static std::map<std::string, service> services = {\n" |
|
|
|
h += "static std::map<std::string, service> services = {\n" |
|
|
|
for k, v in SERVICE_LIST.items(): |
|
|
|
for k, v in SERVICE_LIST.items(): |
|
|
|
should_log = "true" if v.should_log else "false" |
|
|
|
should_log = "true" if v.should_log else "false" |
|
|
|
decimation = -1 if v.decimation is None else v.decimation |
|
|
|
decimation = -1 if v.decimation is None else v.decimation |
|
|
|
h += ' { "%s", {"%s", %s, %d, %d}},\n' % \ |
|
|
|
h += ' { "%s", {"%s", %s, %f, %d}},\n' % \ |
|
|
|
(k, k, should_log, v.frequency, decimation) |
|
|
|
(k, k, should_log, v.frequency, decimation) |
|
|
|
h += "};\n" |
|
|
|
h += "};\n" |
|
|
|
|
|
|
|
|
|
|
|