1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-17 21:35:27 +03:00

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

This commit is contained in:
Damjan Adamic 2016-08-29 23:18:20 +02:00
parent f0c2f10e27
commit 1ef91597ca
8 changed files with 75 additions and 21 deletions

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 */
};