Horus internal GPS: settable baudrate, misc fixes, new cmake options, cosmetics, cli

This commit is contained in:
Damjan Adamic
2016-08-29 23:22:46 +02:00
parent f0c2f10e27
commit 1ef91597ca
8 changed files with 75 additions and 21 deletions
+17
View File
@@ -708,6 +708,20 @@ int cliShowJitter(const char ** argv)
}
#endif
#if defined(INTERNAL_GPS)
int cliGps(const char ** argv)
{
int baudrate = 0;
if (toInt(argv, 1, &baudrate) > 0 && baudrate > 0) {
gpsInit(baudrate);
serialPrint("GPS baudrate set to %d", baudrate);
}
else {
serialPrint("%s: Invalid arguments", argv[0]);
}
return 0;
}
#endif
const CliCommand cliCommands[] = {
{ "beep", cliBeep, "[<frequency>] [<duration>]" },
@@ -731,6 +745,9 @@ const CliCommand cliCommands[] = {
{ "repeat", cliRepeat, "<interval> <command>" },
#if defined(JITTER_MEASURE)
{ "jitter", cliShowJitter, "" },
#endif
#if defined(INTERNAL_GPS)
{ "gps", cliGps, "<baudrate>" },
#endif
{ NULL, NULL, NULL } /* sentinel */
};