1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

gps passthrough cli command

This commit is contained in:
Kemal Hadimli 2013-10-29 19:35:13 +02:00
parent 77d455f82b
commit c4dd556f3d
3 changed files with 38 additions and 0 deletions

View file

@ -9,6 +9,7 @@ static void cliDefaults(char *cmdline);
static void cliDump(char *cmdLine);
static void cliExit(char *cmdline);
static void cliFeature(char *cmdline);
static void cliGpsPassthrough(char *cmdline);
static void cliHelp(char *cmdline);
static void cliMap(char *cmdline);
static void cliMixer(char *cmdline);
@ -73,6 +74,7 @@ const clicmd_t cmdTable[] = {
{ "dump", "print configurable settings in a pastable form", cliDump },
{ "exit", "", cliExit },
{ "feature", "list or -val or val", cliFeature },
{ "gpspassthrough", "passthrough gps to serial", cliGpsPassthrough },
{ "help", "", cliHelp },
{ "map", "mapping of rc channel order", cliMap },
{ "mixer", "mixer name or list", cliMixer },
@ -657,6 +659,15 @@ static void cliFeature(char *cmdline)
}
}
static void cliGpsPassthrough(char *cmdline)
{
cliPrint("Enabling GPS passthrough...");
if (gpsSetPassthrough() == -1) {
cliPrint("Error: Enable and plug in GPS first\r\n");
}
}
static void cliHelp(char *cmdline)
{
uint32_t i = 0;