From 03ce85f1698ec8745038f4bd6d0eddd11dc6c184 Mon Sep 17 00:00:00 2001 From: Michael Lyle Date: Mon, 4 Dec 2017 23:04:51 -0800 Subject: [PATCH] pios_sys: move gyroint arg to -G from -g Escapes a conflict with the flightgear stuff. --- flight/PiOS/posix/pios_sys.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/flight/PiOS/posix/pios_sys.c b/flight/PiOS/posix/pios_sys.c index 3ceea22cb6..a91f1ca52d 100644 --- a/flight/PiOS/posix/pios_sys.c +++ b/flight/PiOS/posix/pios_sys.c @@ -33,8 +33,6 @@ * of this source file; otherwise redistribution is prohibited. */ - - /* Project Includes */ #if !defined(_GNU_SOURCE) #define _GNU_SOURCE @@ -123,7 +121,7 @@ static void Usage(char *cmdName) { "\t\t\tAvailable drivers: gps msp lighttelemetry telemetry omnip\n" #endif #ifdef PIOS_INCLUDE_SPI - "\t-g gpionum\tSpecifies the gyro interrupt is on gpionum\n" + "\t-G gpionum\tSpecifies the gyro interrupt is on gpionum\n" "\t-s spibase\tConfigures a SPI interface on the base path\n" "\t-d drvname:bus:id\tStarts driver drvname on bus/id\n" "\t\t\tAvailable drivers: bmm150 bmx055 flyingpio ms5611\n" @@ -471,7 +469,7 @@ void PIOS_SYS_Args(int argc, char *argv[]) { bool first_arg = true; - while ((opt = getopt(argc, argv, "yfrx:g:l:s:d:S:I:i:m:")) != -1) { + while ((opt = getopt(argc, argv, "yfrxG:g:l:s:d:S:I:i:m:")) != -1) { switch (opt) { #ifdef PIOS_INCLUDE_SIMSENSORS_YASIM case 'y': @@ -559,7 +557,7 @@ void PIOS_SYS_Args(int argc, char *argv[]) { break; #endif #ifdef PIOS_INCLUDE_SPI - case 'g': + case 'G': { if (!first_arg) { printf("Gyro int must be before hw\n"); @@ -588,6 +586,7 @@ void PIOS_SYS_Args(int argc, char *argv[]) { exit(1); } break; + case 's': { struct pios_spi_cfg *spi_cfg;