kopia lustrzana https://github.com/weetmuts/wmbusmeters
Improved debug info.
rodzic
561b0ee5d3
commit
dbd8a77afa
|
@ -151,7 +151,9 @@ bool parseDV(Telegram *t,
|
|||
|
||||
string value = bin2hex(data, len);
|
||||
(*values)[key] = { start_parse_here+data-data_start, value };
|
||||
t->addExplanation(data, len, "%s", value.c_str());
|
||||
if (value.length() > 0) {
|
||||
t->addExplanation(data, len, "%s", value.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
string format_string = bin2hex(format_bytes);
|
||||
|
|
6
wmbus.cc
6
wmbus.cc
|
@ -382,11 +382,7 @@ void Telegram::explainParse(string intro, int from)
|
|||
{
|
||||
for (auto& p : explanations) {
|
||||
if (p.first < from) continue;
|
||||
printf("%s ", intro.c_str());
|
||||
for (int i=0; i<p.first; ++i) {
|
||||
printf(" ");
|
||||
}
|
||||
printf("%s\n", p.second.c_str());
|
||||
printf("%s %02x: %s\n", intro.c_str(), p.first, p.second.c_str());
|
||||
}
|
||||
string hex = bin2hex(parsed);
|
||||
printf("%s %s\n", intro.c_str(), hex.c_str());
|
||||
|
|
Ładowanie…
Reference in New Issue