From 97e26fd51b5e235d0e60aeac4252f0b1bb0d1dff Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 11 Jan 2020 20:59:08 -0800 Subject: mobile: allow disabling BT support from the command line This is a quick hack to reduce the noise in the log file when chasing other bugs. Maybe this should not be enabled on release builds, but right now I don't think the harm that having this in would do. Signed-off-by: Dirk Hohndel --- core/subsurfacestartup.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/subsurfacestartup.c') diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 85235b9f7..bf61f9878 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -104,6 +104,7 @@ struct preferences default_prefs = { }; int run_survey; +int ignore_bt; #ifdef SUBSURFACE_MOBILE_DESKTOP char *testqml = NULL; #endif @@ -179,6 +180,7 @@ static void print_help() printf("\nUsage: subsurface [options] [logfile ...] [--import logfile ...]"); printf("\n\noptions include:"); printf("\n --help|-h This help text"); + printf("\n --ignore-bt Don't enable Bluetooth support"); printf("\n --import logfile ... Logs before this option is treated as base, everything after is imported"); printf("\n --verbose|-v Verbose debug (repeat to increase verbosity)"); printf("\n --version Prints current version"); @@ -224,6 +226,10 @@ void parse_argument(const char *arg) print_help(); exit(0); } + if (strcmp(arg, "--ignore-bt") == 0) { + ignore_bt = true; + return; + } if (strcmp(arg, "--import") == 0) { imported = true; /* mark the dives so far as the base, * everything after is imported */ return; -- cgit v1.2.3-70-g09d2