From 63474dd9526dc6f843a4dbe4f52b79daf31bce6e Mon Sep 17 00:00:00 2001 From: geeksville Date: Fri, 10 Jul 2020 12:16:10 -0700 Subject: [PATCH] Only try for NEMA if we have serial --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cf254b49f..9c3bc63f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -265,12 +265,14 @@ void setup() // Init GPS - first try ublox gps = new UBloxGPS(); if (!gps->setup()) { - // Some boards might have only the TX line from the GPS connected, in that case, we can't configure it at all. Just - // assume NEMA at 9600 baud. - DEBUG_MSG("ERROR: No UBLOX GPS found, hoping that NEMA might work\n"); - delete gps; + DEBUG_MSG("ERROR: No UBLOX GPS found\n"); if(GPS::_serial_gps) { + // Some boards might have only the TX line from the GPS connected, in that case, we can't configure it at all. Just + // assume NEMA at 9600 baud. + DEBUG_MSG("Hoping that NEMA might work\n"); + delete gps; + // dumb NEMA access only work for serial GPSes) gps = new NEMAGPS(); gps->setup();