aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-18 16:26:11 -0700
committermbr0wn <martin.braun@ettus.com>2016-10-18 17:15:16 -0700
commitad5b10677c91494f87c363e9096b7a2e61e414f6 (patch)
treede1a5d3b1ec94f94f010643a467a1eb79c5a7a9a /host
parent3660cc42cc98e1e1055340d06281b00fc8a78ecd (diff)
downloaduhd-ad5b10677c91494f87c363e9096b7a2e61e414f6.tar.gz
uhd-ad5b10677c91494f87c363e9096b7a2e61e414f6.tar.bz2
uhd-ad5b10677c91494f87c363e9096b7a2e61e414f6.zip
b200: Make sure no GPS settings are applied when no gpsdo present.
This changes the exception message thrown when gpsdo is selected as a clock source, but does not change the exception. Note that before, during its first run, the B2x0 would happily accept gpsdo as a clock source even when none was present.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 33f0850eb..9bd2799c2 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -1041,8 +1041,11 @@ void b200_impl::update_clock_source(const std::string &source)
}
_adf4001_iface->set_lock_to_ext_ref(true);
}
- else if (_gps and source == "gpsdo")
+ else if (source == "gpsdo")
{
+ if (not _gps or not _gps->gps_detected()) {
+ throw uhd::key_error("update_clock_source: gpsdo selected, but no gpsdo detected!");
+ }
if (_gpio_state.ref_sel != 1)
{
_gpio_state.ref_sel = 1;