Skip to content

Commit

Permalink
make log_ppm work with argument 0 as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Sep 2, 2024
1 parent 123fbf1 commit d6932bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion readsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,9 +1924,12 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
if (strcasecmp(token[0], "log_ppm") == 0) {
if (token[1]) {
Modes.devel_log_ppm = atoi(token[1]);
} else {
}
if (Modes.devel_log_ppm == 0) {
Modes.devel_log_ppm = -1;
}
// setting to -1 to enable due to the following check
// if (Modes.devel_log_ppm && fabs(ppm) > Modes.devel_log_ppm) {
}

if (strcasecmp(token[0], "sbs_override_squawk") == 0 && token[1]) {
Expand Down

0 comments on commit d6932bb

Please sign in to comment.