aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorMoritz Fischer <moritz.fischer@ettus.com>2015-05-12 15:49:22 -0700
committerMoritz Fischer <moritz.fischer@ettus.com>2015-05-12 16:10:02 -0700
commit2fc2fb36eb09fd03c0c95393e896baa9cdb47d2d (patch)
treefe6f15ef26af89817647a2d8975a1a1f8a9fd56e /host/lib/usrp
parentadb6a061687d470b6f6ccdb3221855808396cd39 (diff)
downloaduhd-2fc2fb36eb09fd03c0c95393e896baa9cdb47d2d.tar.gz
uhd-2fc2fb36eb09fd03c0c95393e896baa9cdb47d2d.tar.bz2
uhd-2fc2fb36eb09fd03c0c95393e896baa9cdb47d2d.zip
fixup! e300: gps: If gps is detected, set device time to gps time on init.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index b35bbab4e..693aa5734 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -578,6 +578,9 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
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));
+
+ // wait for time to be actually set
+ boost::this_thread::sleep(boost::posix_time::seconds(1));
}
boost::uint8_t e300_impl::_get_internal_gpio(