Skip to content

Commit

Permalink
pios_sys: move gyroint arg to -G from -g
Browse files Browse the repository at this point in the history
Escapes a conflict with the flightgear stuff.
  • Loading branch information
mlyle committed Dec 5, 2017
1 parent 7f505c1 commit 361a956
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions flight/PiOS/posix/pios_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
* of this source file; otherwise redistribution is prohibited.
*/



/* Project Includes */
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
Expand Down Expand Up @@ -121,7 +119,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"
Expand Down Expand Up @@ -467,7 +465,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:")) != -1) {
while ((opt = getopt(argc, argv, "yfrxG:g:l:s:d:S:I:i:")) != -1) {
switch (opt) {
case 'y':
use_yasim = true;
Expand Down Expand Up @@ -552,7 +550,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");
Expand Down Expand Up @@ -581,6 +579,7 @@ void PIOS_SYS_Args(int argc, char *argv[]) {
exit(1);
}
break;

case 's':
{
struct pios_spi_cfg *spi_cfg;
Expand Down

0 comments on commit 361a956

Please sign in to comment.