diff options
Diffstat (limited to 'OutputUHD.cpp')
| -rw-r--r-- | OutputUHD.cpp | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/OutputUHD.cpp b/OutputUHD.cpp index a80f5b9..9536ebd 100644 --- a/OutputUHD.cpp +++ b/OutputUHD.cpp @@ -67,14 +67,13 @@ OutputUHD::OutputUHD(double txgain, double rxgain, double samplerate) :      m_usrp->set_rx_gain(m_rxgain);      MDEBUG("OutputUHD:Actual RX Gain: %f ...\n", m_usrp->get_rx_gain()); -    double tx_time = m_usrp->get_time_now().get_real_secs(); +    const double usrp_time = m_usrp->get_time_now().get_real_secs();      MDEBUG("OutputUHD: USRP time %f\n", -            tx_time); +            usrp_time);      md.start_of_burst = false;      md.end_of_burst   = false;      md.has_time_spec  = true; -    md.time_spec      = uhd::time_spec_t(tx_time + 2);      uhd::stream_args_t stream_args("fc32"); //complex floats      myTxStream = m_usrp->get_tx_stream(stream_args); @@ -89,13 +88,13 @@ OutputUHD::OutputUHD(double txgain, double rxgain, double samplerate) :  } -size_t OutputUHD::Transmit(const complexf *samples, size_t sizeIn, double *first_sample_time) +size_t OutputUHD::Transmit(const complexf *samples, size_t sizeIn, double transmit_time)  {      const double tx_timeout = 20.0;      size_t usrp_max_num_samps = myTxStream->get_max_num_samps(); -    *first_sample_time = md.time_spec.get_real_secs(); +    md.time_spec      = uhd::time_spec_t(transmit_time);      size_t num_acc_samps = 0; //number of accumulated samples      while (num_acc_samps < sizeIn) { | 
