gtjoseph / mt3339-utils

MIT License
65 stars 21 forks source link

gpsinit won't accept "-f" option if -n or -i is also specified #8

Closed nickleverton closed 5 years ago

nickleverton commented 5 years ago

An advanced user may well want to send a "-f" command file without an initialisation sequence, however gpsinit prevents this by adding all of -f, -n and -i options to the option parser as an exclusive group.

I believe this is unintentional, and the attached patch should fix it by making only "-n" and "-i" be mutually exclusive. If neither is specified then the default initialisation sequence remains unchanged. The patch also swaps the order of declaration of -f and -i for clarity.

gpsinit-option-parser.diff.txt

Nick

nickleverton commented 5 years ago

Actually that's not helpful, sorry I misunderstood the code. I think that -f is supposed to include an init sequence itself. Doesn't explain why sometimes my init sequence still fails though.