Change 2-bit correction option to "--fix-2bit"

--fix --fix was a poor choice for this, as some existing configs
happened to specify --fix twice but only expected 1-bit correction.
So move 2-bit correction to a separate option.

"--fix" or "--fix --fix" now gives 1-bit correction.
"--fix-2bit" or "--fix --fix-2bit" or "--fix-2bit --fix" gives 2-bit correction.

Version bump to 3.8.2~dev
This commit is contained in:
Oliver Jowett 2020-05-02 14:53:30 +08:00
parent d6b8065c3b
commit 8879bcac86
2 changed files with 15 additions and 3 deletions

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
dump1090-fa (3.8.2~dev) UNRELEASED; urgency=medium
* in development
* --fix --fix was a bad choice for 2-bit correction since some existing configs
accidentally specified it twice anyway. Change 2-bit correction to a separate
option, --fix-2bit
-- Oliver Jowett <oliver.jowett@flightaware.com> Sat, 02 May 2020 14:50:25 +0800
dump1090-fa (3.8.1) stable; urgency=medium dump1090-fa (3.8.1) stable; urgency=medium
* SkyAware: Fixed SkyAware banner aspect ratio * SkyAware: Fixed SkyAware banner aspect ratio

View File

@ -309,8 +309,8 @@ void showHelp(void) {
"--lat <latitude> Reference/receiver latitude for surface posn (opt)\n" "--lat <latitude> Reference/receiver latitude for surface posn (opt)\n"
"--lon <longitude> Reference/receiver longitude for surface posn (opt)\n" "--lon <longitude> Reference/receiver longitude for surface posn (opt)\n"
"--max-range <distance> Absolute maximum range for position decoding (in nm, default: 300)\n" "--max-range <distance> Absolute maximum range for position decoding (in nm, default: 300)\n"
"--fix Enable single-bits error correction using CRC\n" "--fix Enable single-bit error correction using CRC\n"
" (specify twice for two-bit error correction)\n" "--fix-2bit Enable two-bit error correction using CRC (use with caution)\n"
"--no-fix Disable error correction using CRC\n" "--no-fix Disable error correction using CRC\n"
"--no-crc-check Disable messages with broken CRC (discouraged)\n" "--no-crc-check Disable messages with broken CRC (discouraged)\n"
"--mlat display raw messages in Beast ascii mode\n" "--mlat display raw messages in Beast ascii mode\n"
@ -481,7 +481,10 @@ int main(int argc, char **argv) {
} else if (!strcmp(argv[j],"--measure-noise")) { } else if (!strcmp(argv[j],"--measure-noise")) {
// Ignored // Ignored
} else if (!strcmp(argv[j],"--fix")) { } else if (!strcmp(argv[j],"--fix")) {
++Modes.nfix_crc; if (Modes.nfix_crc < 1)
Modes.nfix_crc = 1;
} else if (!strcmp(argv[j],"--fix-2bit")) {
Modes.nfix_crc = 2;
} else if (!strcmp(argv[j],"--no-fix")) { } else if (!strcmp(argv[j],"--no-fix")) {
Modes.nfix_crc = 0; Modes.nfix_crc = 0;
} else if (!strcmp(argv[j],"--no-crc-check")) { } else if (!strcmp(argv[j],"--no-crc-check")) {