aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_impl.cpp
diff options
context:
space:
mode:
authorMoritz Fischer <moritz.fischer@ettus.com>2015-05-01 16:06:12 -0700
committerMoritz Fischer <moritz.fischer@ettus.com>2015-05-01 16:06:12 -0700
commite1f466e24ebf3f890330d0dadbb399548d156ae4 (patch)
tree556d6f99b4f3c0224a0cb1eaa2eeb9e71668a0cb /host/lib/usrp/e300/e300_impl.cpp
parent4d3b80c338f34d7dc9516e7cdff7782aaf922b9c (diff)
downloaduhd-e1f466e24ebf3f890330d0dadbb399548d156ae4.tar.gz
uhd-e1f466e24ebf3f890330d0dadbb399548d156ae4.tar.bz2
uhd-e1f466e24ebf3f890330d0dadbb399548d156ae4.zip
e300: gps: If gps doesn't have lock return 0 as time.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Diffstat (limited to 'host/lib/usrp/e300/e300_impl.cpp')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 735f109b4..b35bbab4e 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -575,16 +575,9 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(rx_spec);
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(tx_spec);
- // gps installed: use time and init time spec
- if (_sensor_manager->get_sensor("gps_locked").to_bool()) {
- _tree->access<std::string>(mb_path / "time_source" / "value").set("gpsdo");
- UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
- const time_t tp = time_t(_sensor_manager->get_sensor("gps_time").to_int()+1);
- _tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp));
- } else {
- //init to internal time source
- _tree->access<std::string>(mb_path / "time_source/value").set("internal");
- }
+ UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
+ const time_t tp = time_t(_sensor_manager->get_sensor("gps_time").to_int()+1);
+ _tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp));
}
boost::uint8_t e300_impl::_get_internal_gpio(