1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Merge pull request #8 from disq/gps_passthrough

GPS passthrough cli command
This commit is contained in:
dongie 2013-11-02 06:45:16 -07:00
commit ab6df2e317
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);
@ -77,6 +78,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 },
@ -665,6 +667,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;