diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-10-06 12:25:31 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-10-06 12:25:31 -0400 |
commit | 797b5924d310fe6d5fdcce176b6fb3d89618b7b5 (patch) | |
tree | 6b1277d4d2bfdd4abff01ff8c012a7d7dfad0bdb /gr-uhd | |
parent | 4f03a54b2b802f0eff6802985ec6479738843c57 (diff) | |
parent | 41fbbc6a54fc7c3d9a9d73697f412bca234061bb (diff) |
Merge branch 'maint'
Diffstat (limited to 'gr-uhd')
-rw-r--r-- | gr-uhd/lib/usrp_sink_impl.cc | 16 | ||||
-rw-r--r-- | gr-uhd/lib/usrp_source_impl.cc | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc index 3301ca1815..c184f0a406 100644 --- a/gr-uhd/lib/usrp_sink_impl.cc +++ b/gr-uhd/lib/usrp_sink_impl.cc @@ -576,7 +576,7 @@ namespace gr { #endif //if using length_tags, decrement items left to send by the number of samples sent - if(not pmt::is_null(_length_tag_key) and _nitems_to_send > 0) { + if(not pmt::is_null(_length_tag_key) && _nitems_to_send > 0) { _nitems_to_send -= long(num_sent); } @@ -584,7 +584,7 @@ namespace gr { _metadata.time_spec += ::uhd::time_spec_t(0, num_sent, _sample_rate); // Some post-processing tasks if we actually transmitted the entire burst - if (not _pending_cmds.empty() and num_sent == size_t(ninput_items)) { + if (not _pending_cmds.empty() && num_sent == size_t(ninput_items)) { GR_LOG_DEBUG(d_debug_logger, boost::format("Executing %d pending commands.") % _pending_cmds.size()); BOOST_FOREACH(const pmt::pmt_t &cmd_pmt, _pending_cmds) { msg_handler_command(cmd_pmt); @@ -656,7 +656,7 @@ namespace gr { } //set the start of burst flag in the metadata; ignore if length_tag_key is not null - else if(pmt::is_null(_length_tag_key) and pmt::equal(key, SOB_KEY)) { + else if(pmt::is_null(_length_tag_key) && pmt::equal(key, SOB_KEY)) { if (my_tag.offset != samp0_count) { max_count = my_tag_count; break; @@ -667,7 +667,7 @@ namespace gr { } //length_tag found; set the start of burst flag in the metadata - else if(not pmt::is_null(_length_tag_key) and pmt::equal(key, _length_tag_key)) { + else if(not pmt::is_null(_length_tag_key) && pmt::equal(key, _length_tag_key)) { if (my_tag_count != samp0_count) { max_count = my_tag_count; break; @@ -691,7 +691,7 @@ namespace gr { * the appropriate action. Otherwise, make sure the corresponding sample * is the last one. */ - else if (pmt::equal(key, FREQ_KEY) and my_tag_count == samp0_count) { + else if (pmt::equal(key, FREQ_KEY) && my_tag_count == samp0_count) { // If it's on the first sample, immediately do the tune: GR_LOG_DEBUG(d_debug_logger, boost::format("Received tx_freq on start of burst.")); msg_handler_command(pmt::cons(pmt::mp("freq"), value)); @@ -711,14 +711,14 @@ namespace gr { * * Make sure that no more samples are allowed through. */ - else if(pmt::is_null(_length_tag_key) and pmt::equal(key, EOB_KEY)) { + else if(pmt::is_null(_length_tag_key) && pmt::equal(key, EOB_KEY)) { found_eob = true; max_count = my_tag_count + 1; _metadata.end_of_burst = pmt::to_bool(value); } } // end foreach - if(not pmt::is_null(_length_tag_key) and long(max_count - samp0_count) == _nitems_to_send) { + if(not pmt::is_null(_length_tag_key) && long(max_count - samp0_count) == _nitems_to_send) { found_eob = true; } @@ -769,7 +769,7 @@ namespace gr { _metadata.start_of_burst = true; _metadata.end_of_burst = false; // Bursty tx will need to send a tx_time to activate time spec - _metadata.has_time_spec = not _stream_now and pmt::is_null(_length_tag_key); + _metadata.has_time_spec = !_stream_now && pmt::is_null(_length_tag_key); _nitems_to_send = 0; if(_start_time_set) { _start_time_set = false; //cleared for next run diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc index a71f53c5b3..3142627952 100644 --- a/gr-uhd/lib/usrp_source_impl.cc +++ b/gr-uhd/lib/usrp_source_impl.cc @@ -710,7 +710,7 @@ namespace gr { if (command == "freq") { double freq = pmt::to_double(cmd_value); for (size_t i = 0; i < _nchan; i++) { - if (chan == -1 or chan == int(i)) { + if (chan == -1 || chan == int(i)) { set_center_freq(freq, i); } } @@ -720,7 +720,7 @@ namespace gr { } else if (command == "gain") { double gain = pmt::to_double(cmd_value); for (size_t i = 0; i < _nchan; i++) { - if (chan == -1 or chan == int(i)) { + if (chan == -1 || chan == int(i)) { set_gain(gain, i); } } |