diff --git a/esp32_marauder/GpsInterface.cpp b/esp32_marauder/GpsInterface.cpp index 9b4260e..f860552 100644 --- a/esp32_marauder/GpsInterface.cpp +++ b/esp32_marauder/GpsInterface.cpp @@ -36,7 +36,8 @@ void GpsInterface::begin() { Serial2.read(); } - this->flush_queue(); //init the queue, kill NULLs + this->type_flag=GPSTYPE_NATIVE; //enforce default + this->disable_queue(); //init the queue, disabled, kill NULLs nmea.setUnknownSentenceHandler(gps_nmea_notimp); } @@ -225,8 +226,8 @@ void GpsInterface::enable_queue(){ } void GpsInterface::disable_queue(){ - this->flush_queue(); this->queue_enabled_flag=0; + this->flush_queue(); } bool GpsInterface::queue_enabled(){ diff --git a/esp32_marauder/GpsInterface.h b/esp32_marauder/GpsInterface.h index a2f9c3b..ae6f7ee 100644 --- a/esp32_marauder/GpsInterface.h +++ b/esp32_marauder/GpsInterface.h @@ -98,4 +98,4 @@ class GpsInterface { void setGPSInfo(); }; -#endif \ No newline at end of file +#endif