Skip to content

Commit

Permalink
sml_server: Add option -d to enable DZG workaround
Browse files Browse the repository at this point in the history
This is necessary since we can't decide automatically if the workaround
needs to be enabled. (See previous commits for details.)
  • Loading branch information
tanuva committed Oct 8, 2023
1 parent 0f1abb5 commit e4201d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/sml_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ int main(int argc, char *argv[]) {
while ((c = getopt(argc, argv, "+hsv")) != -1) {
switch (c) {
case 'h':
printf("usage: %s [-h] [-s] [-v] device\n", argv[0]);
printf("usage: %s [-d] [-h] [-s] [-v] device\n", argv[0]);
printf("device - serial device of connected power meter e.g. /dev/cu.usbserial, or - for stdin\n");
printf("-d - Enable negative values workaround for certain DZG meters\n");
printf("-h - help\n");
printf("-s - process only one OBIS data stream (single)\n");
printf("-v - verbose\n");
exit(0); // exit here
break;
case 'd':
workarounds |= SML_WORKAROUND_DZG_NEGATIVE;
break;
case 's':
sflag = true;
break;
Expand Down

0 comments on commit e4201d3

Please sign in to comment.