From 4d370bd247c8feedb05cb0d16abe16a4029848da Mon Sep 17 00:00:00 2001 From: Malcolm Robb Date: Fri, 26 Apr 2013 10:12:47 +0100 Subject: [PATCH] Change default for error correction to OFF Add a --fix command line switch to enable error correction using CRC. Change the default to OFF/Disabled. Error correction can very occasionally result in an incorrect solution to the crc equation. It also takes significant CPU work for very few corrected results. Therefore, the default has been changed to OFF, but you can re-enable it if you wish by using the --fix command line switch. --- dump1090.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dump1090.c b/dump1090.c index 9244024..f4ed3dd 100644 --- a/dump1090.c +++ b/dump1090.c @@ -56,7 +56,7 @@ // MinorVer changes when additional features are added, but not for bug fixes (range 00-99) // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update // -#define MODES_DUMP1090_VERSION "1.02.2504.13" +#define MODES_DUMP1090_VERSION "1.02.2604.13" #define MODES_DEFAULT_RATE 2000000 #define MODES_DEFAULT_FREQ 1090000000 @@ -326,7 +326,7 @@ void modesInitConfig(void) { Modes.ppm_error = 0; Modes.freq = MODES_DEFAULT_FREQ; Modes.filename = NULL; - Modes.fix_errors = 1; + Modes.fix_errors = 0; Modes.check_crc = 1; Modes.raw = 0; Modes.beast = 0; @@ -3313,6 +3313,7 @@ void showHelp(void) { "--net-ri-port TCP raw input listen port (default: 30001)\n" "--net-http-port HTTP server port (default: 8080)\n" "--net-sbs-port TCP BaseStation output listen port (default: 30003)\n" +"--fix Enable single-bits error correction using CRC\n" "--no-fix Disable single-bits error correction using CRC\n" "--no-crc-check Disable messages with broken CRC (discouraged)\n" "--aggressive More CPU for more messages (two bits fixes, ...)\n" @@ -3385,6 +3386,8 @@ int main(int argc, char **argv) { Modes.freq = (int) strtoll(argv[++j],NULL,10); } else if (!strcmp(argv[j],"--ifile") && more) { Modes.filename = strdup(argv[++j]); + } else if (!strcmp(argv[j],"--fix")) { + Modes.fix_errors = 1; } else if (!strcmp(argv[j],"--no-fix")) { Modes.fix_errors = 0; } else if (!strcmp(argv[j],"--no-crc-check")) {