aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2014-05-06 16:34:29 -0700
committermichael-west <michael.west@ettus.com>2014-05-06 16:34:29 -0700
commitc0088b4a13bbcabaef0cca14ce46e96e560eecdb (patch)
tree227bf020f3b6aab0ffc8b907c37353e4b37b812c
parent8d6801877ed959c9b93ebced472c6107afaff681 (diff)
parent583208af1e4b5cedc03464e52d5be527bc3b9286 (diff)
downloaduhd-c0088b4a13bbcabaef0cca14ce46e96e560eecdb.tar.gz
uhd-c0088b4a13bbcabaef0cca14ce46e96e560eecdb.tar.bz2
uhd-c0088b4a13bbcabaef0cca14ce46e96e560eecdb.zip
Merge branch 'maint'
-rw-r--r--host/lib/usrp/gps_ctrl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index 6f5c75dec..d327a84f9 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -74,8 +74,15 @@ private:
// Get all GPSDO messages available
// Creating a map here because we only want the latest of each message type
- for (std::string msg = _recv(); msg.length() > 6; msg = _recv())
+ for (std::string msg = _recv(); msg.length(); msg = _recv())
{
+ if (msg.length() < 6)
+ continue;
+
+ // Strip any end of line characters
+ erase_all(msg, "\r");
+ erase_all(msg, "\n");
+
// Look for SERVO message
if (boost::regex_search(msg, status_regex, boost::regex_constants::match_continuous))
msgs["SERVO"] = msg;