From 85f46e5fc0a71facf12f6eace17ad914efd75ceb Mon Sep 17 00:00:00 2001 From: Kartik Mohta Date: Mon, 11 Dec 2017 19:09:31 -0500 Subject: [PATCH] Minor fixes for very old devices --- ublox_gps/include/ublox_gps/node.h | 2 +- ublox_gps/src/node.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ublox_gps/include/ublox_gps/node.h b/ublox_gps/include/ublox_gps/node.h index 2adc6b27..8231894e 100644 --- a/ublox_gps/include/ublox_gps/node.h +++ b/ublox_gps/include/ublox_gps/node.h @@ -585,7 +585,7 @@ class UbloxNode : public virtual ComponentInterface { std::vector > components_; //! Determined From Mon VER - float protocol_version_; + float protocol_version_ = 0; // Variables set from parameter server //! Device port std::string device_; diff --git a/ublox_gps/src/node.cpp b/ublox_gps/src/node.cpp index d8688737..16b1fef2 100644 --- a/ublox_gps/src/node.cpp +++ b/ublox_gps/src/node.cpp @@ -366,7 +366,8 @@ void UbloxNode::processMonVer() { if(protocol_version_ < 18) { // Final line contains supported GNSS delimited by ; std::vector strs; - boost::split(strs, extension[extension.size()-1], boost::is_any_of(";")); + if(extension.size() > 0) + boost::split(strs, extension[extension.size()-1], boost::is_any_of(";")); for(size_t i = 0; i < strs.size(); i++) supported.insert(strs[i]); } else {