Horus internal GPS: settable baudrate, misc fixes, new cmake options, cosmetics, cli
This commit is contained in:
@@ -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 */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user