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>2015-12-18 08:56:40 +0100
commit7ead6dd1cd0170a1ed6b64142828e2b7bb5b7b07 (patch)
tree547ead802ab384821fc699b05e17869a16ac65af /host/lib/usrp/b200
parentb031df453853ddeb156f109523a42b9c9251fa1f (diff)
downloaduhd-7ead6dd1cd0170a1ed6b64142828e2b7bb5b7b07.tar.gz
uhd-7ead6dd1cd0170a1ed6b64142828e2b7bb5b7b07.tar.bz2
uhd-7ead6dd1cd0170a1ed6b64142828e2b7bb5b7b07.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 ffce08567..3da402f13 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -704,12 +704,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)