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:
parent
77d455f82b
commit
c4dd556f3d
3 changed files with 38 additions and 0 deletions
11
src/cli.c
11
src/cli.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue