From 60b8c28be2d3fabb3d49aa0fd8a37fed26b9ed96 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 28 Jun 2015 13:35:55 +0200 Subject: [PATCH] INAV app: Fix commandline handling --- .../position_estimator_inav_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/position_estimator_inav/position_estimator_inav_main.c b/src/modules/position_estimator_inav/position_estimator_inav_main.c index 7af3a355eb..e0d7844d95 100644 --- a/src/modules/position_estimator_inav/position_estimator_inav_main.c +++ b/src/modules/position_estimator_inav/position_estimator_inav_main.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2013, 2014 PX4 Development Team. All rights reserved. + * Copyright (c) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -147,10 +147,9 @@ int position_estimator_inav_main(int argc, char *argv[]) verbose_mode = false; - if (argc > 1) - if (!strcmp(argv[2], "-v")) { - verbose_mode = true; - } + if (argc > 2 && !strcmp(argv[2], "-v")) { + verbose_mode = true; + } thread_should_exit = false; position_estimator_inav_task = task_spawn_cmd("position_estimator_inav",