diff --git a/src/cli.c b/src/cli.c index 234d5b9b26..f42e25a6a4 100644 --- a/src/cli.c +++ b/src/cli.c @@ -669,11 +669,10 @@ static void cliFeature(char *cmdline) static void cliGpsPassthrough(char *cmdline) { - cliPrint("Enabling GPS passthrough..."); - - if (gpsSetPassthrough() == -1) { + if (gpsSetPassthrough() == -1) cliPrint("Error: Enable and plug in GPS first\r\n"); - } + else + cliPrint("Enabling GPS passthrough...\r\n"); } static void cliHelp(char *cmdline) diff --git a/src/gps.c b/src/gps.c index e976f554f1..4df644d506 100644 --- a/src/gps.c +++ b/src/gps.c @@ -542,7 +542,7 @@ int8_t gpsSetPassthrough(void) if (gpsData.state != GPS_RECEIVINGDATA) return -1; -// get rid of callback + // get rid of callback core.gpsport->callback = NULL; LED0_OFF; @@ -553,16 +553,15 @@ int8_t gpsSetPassthrough(void) LED0_ON; serialWrite(core.mainport, serialRead(core.gpsport)); LED0_OFF; - } + } if (serialTotalBytesWaiting(core.mainport)) { LED1_ON; serialWrite(core.gpsport, serialRead(core.mainport)); LED1_OFF; - } } + } } - // OK here is the onboard GPS code ////////////////////////////////////////////////////////////////////////////////////