From 25494489bf8b7c60875ea355d29323bcfffd604b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 9 Sep 2011 13:39:52 -0700 Subject: usrp2: uart/udp work in host and fw, working --- host/lib/usrp/usrp2/usrp2_impl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp') diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 03a9d09fe..47aec08d5 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -438,10 +438,9 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){ // create gpsdo control objects //////////////////////////////////////////////////////////////// if (_mbc[mb].iface->mb_eeprom["gpsdo"] == "internal"){ - _mbc[mb].gps = gps_ctrl::make( - _mbc[mb].iface->get_gps_write_fn(), - _mbc[mb].iface->get_gps_read_fn() - ); + _mbc[mb].gps = gps_ctrl::make(udp_simple::make_uart(udp_simple::make_connected( + addr, BOOST_STRINGIZE(USRP2_UDP_UART_GPS_PORT) + ))); if(_mbc[mb].gps->gps_detected()) { BOOST_FOREACH(const std::string &name, _mbc[mb].gps->get_sensors()){ _tree->create(mb_path / "sensors" / name) @@ -624,8 +623,10 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){ //GPS installed: use external ref, time, and init time spec if (_mbc[mb].gps.get() and _mbc[mb].gps->gps_detected()){ + UHD_MSG(status) << "Setting references to the internal GPSDO" << std::endl; _tree->access(root / "time_source/value").set("external"); _tree->access(root / "clock_source/value").set("external"); + UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl; _mbc[mb].time64->set_time_next_pps(time_spec_t(time_t(_mbc[mb].gps->get_sensor("gps_time").to_int()+1))); } } -- cgit v1.2.3