summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-04-13 12:32:35 -0700
committerJosh Blum <josh@joshknows.com>2011-04-29 09:58:55 -0700
commit4d73aae4638e5c08b2f55ea229414319befec68e (patch)
tree589b1fa27e3876c1b82b083ef36ca4158472fe35
parent44c8069855aff9adb65448692de3272d0bb1603a (diff)
downloaduhd-4d73aae4638e5c08b2f55ea229414319befec68e.tar.gz
uhd-4d73aae4638e5c08b2f55ea229414319befec68e.tar.bz2
uhd-4d73aae4638e5c08b2f55ea229414319befec68e.zip
GPS parser fixes for get_time.
-rw-r--r--host/lib/usrp/gps_ctrl.cpp10
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp2
2 files changed, 5 insertions, 7 deletions
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index ace56e7ed..de97710f2 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -125,7 +125,6 @@ public:
}
-//TODO: this isn't generalizeable to non-USRP2 USRPs.
std::string safe_gps_read() {
return _recv();
}
@@ -147,18 +146,19 @@ public:
found_gprmc = true;
break;
}
+ boost::this_thread::sleep(boost::posix_time::milliseconds(200));
}
UHD_ASSERT_THROW(found_gprmc);
tok.assign(reply);
toked.assign(tok.begin(), tok.end());
- UHD_ASSERT_THROW(toked.size() == 11); //if it's not we got something weird in there
+ UHD_ASSERT_THROW(toked.size() == 12); //if it's not we got something weird in there
now = ptime( date(
- greg_year(boost::lexical_cast<int>(toked[8].substr(4, 2)) + 2000), //just trust me on this one
- greg_month(boost::lexical_cast<int>(toked[8].substr(2, 2))),
- greg_day(boost::lexical_cast<int>(toked[8].substr(0, 2)))
+ greg_year(boost::lexical_cast<int>(toked[9].substr(4, 2)) + 2000), //just trust me on this one
+ greg_month(boost::lexical_cast<int>(toked[9].substr(2, 2))),
+ greg_day(boost::lexical_cast<int>(toked[9].substr(0, 2)))
),
hours( boost::lexical_cast<int>(toked[1].substr(0, 2)))
+ minutes(boost::lexical_cast<int>(toked[1].substr(2, 2)))
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 42ba714a4..62cc3c403 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -105,8 +105,6 @@ usrp2_mboard_impl::usrp2_mboard_impl(
_iface->get_gps_write_fn(),
_iface->get_gps_read_fn());
- //if(_gps_ctrl->gps_detected()) std::cout << "GPS time: " << _gps_ctrl->get_time() << std::endl;
-
//init the dsp stuff (before setting update packets)
dsp_init();