From 5c3692a5135e3b1f3edad3f0f7fe13d373f36a30 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 21 Jan 2016 17:45:27 +0000 Subject: [PATCH] Require an explicit #define at build time to enable --aggressive. --- dump1090.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dump1090.c b/dump1090.c index a8e74f6..7b7ba4b 100644 --- a/dump1090.c +++ b/dump1090.c @@ -2,7 +2,7 @@ // // dump1090.c: main program & miscellany // -// Copyright (c) 2014,2015 Oliver Jowett +// Copyright (c) 2014-2016 Oliver Jowett // // This file is free software: you may copy, redistribute and/or modify it // under the terms of the GNU General Public License as published by the @@ -702,7 +702,9 @@ void showHelp(void) { "--no-fix Disable single-bits error correction using CRC\n" "--no-crc-check Disable messages with broken CRC (discouraged)\n" "--phase-enhance Enable phase enhancement\n" +#ifdef ALLOW_AGGRESSIVE "--aggressive More CPU for more messages (two bits fixes, ...)\n" +#endif "--mlat display raw messages in Beast ascii mode\n" "--stats With --ifile print stats at exit. No other output\n" "--stats-range Collect/show range histogram\n" @@ -1010,7 +1012,11 @@ int main(int argc, char **argv) { } else if (!strcmp(argv[j],"--hae")) { Modes.use_hae = 1; } else if (!strcmp(argv[j],"--aggressive")) { +#ifdef ALLOW_AGGRESSIVE Modes.nfix_crc = MODES_MAX_BITERRORS; +#else + fprintf(stderr, "warning: --aggressive not supported in this build, option ignored.\n"); +#endif } else if (!strcmp(argv[j],"--interactive")) { Modes.interactive = Modes.throttle = 1; } else if (!strcmp(argv[j],"--throttle")) {