aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-03 12:38:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-05-25 21:37:51 +0200
commitc80d4245ae5f0526a82079d0048af1a30f13e808 (patch)
treea9ab41196d47a0f1de673936b7b23f7a372a254f /host/lib/usrp/b200
parent46776233e603a6edfadebef55cd7b43b43a26a44 (diff)
downloaduhd-c80d4245ae5f0526a82079d0048af1a30f13e808.tar.gz
uhd-c80d4245ae5f0526a82079d0048af1a30f13e808.tar.bz2
uhd-c80d4245ae5f0526a82079d0048af1a30f13e808.zip
Improve LEA-M8F autodetection and poll NAV-SOL
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 734367af1..43aba2621 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -712,12 +712,27 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_radio_perifs[i].ddc->set_host_rate(default_tick_rate / ad936x_manager::DEFAULT_DECIM);
_radio_perifs[i].duc->set_host_rate(default_tick_rate / ad936x_manager::DEFAULT_INTERP);
}
+
// We can automatically choose a master clock rate, but not if the user specifies one
_tree->access<bool>(mb_path / "auto_tick_rate").set(not device_addr.has_key("master_clock_rate"));
if (not device_addr.has_key("master_clock_rate")) {
UHD_MSG(status) << "Setting master clock rate selection to 'automatic'." << std::endl;
}
+ //GPS installed: use external ref, time, and init time spec
+ if (_gps and _gps->gps_detected())
+ {
+ UHD_MSG(status) << "Setting references to the internal GPSDO" << std::endl;
+ _tree->access<std::string>(mb_path / "time_source" / "value").set("gpsdo");
+ _tree->access<std::string>(mb_path / "clock_source" / "value").set("gpsdo");
+
+ if (not _gps->gps_detected_lea_m8f()) {
+ UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
+ const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1);
+ _tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp));
+ }
+ }
+
}
b200_impl::~b200_impl(void)