When debugging then also log telegrams.

pull/5/head
weetmuts 2018-03-05 11:58:55 +01:00
rodzic 65d49a49ba
commit be14d0389d
3 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -28,8 +28,9 @@ Two meter types are supported: multical21 and multical302 (multical302 is still
Currently the meters are hardcoded for the European default setting that specifies what extra data
is sent in the telegrams. If someone has a non-default meter that sends other extra data, then this
will show up as a warning when a long telegram is received (but not in the short telegrams!).
If this should happen, then we need to implement a way to pass the meter configuration as a parameter.
will show up as a warning when a long telegram is received (but not in the short telegrams, where wrong
values might be printed instead!).
If this happens to someone, then we need to implement a way to pass the meter configuration as a parameter.
No meter quadruplets means listen for telegram traffic and print any id heard.

Wyświetl plik

@ -56,8 +56,8 @@ int main(int argc, char **argv)
warningSilenced(cmdline->silence);
verboseEnabled(cmdline->verbose);
debugEnabled(cmdline->debug);
logTelegramsEnabled(cmdline->logtelegrams);
debugEnabled(cmdline->debug);
auto manager = createSerialCommunicationManager();

Wyświetl plik

@ -133,7 +133,10 @@ void verboseEnabled(bool b) {
void debugEnabled(bool b) {
debug_enabled_ = b;
if (debug_enabled_) verbose_enabled_ = true;
if (debug_enabled_) {
verbose_enabled_ = true;
log_telegrams_enabled_ = true;
}
}
void logTelegramsEnabled(bool b) {