[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/24: Simplify some more.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/24: Simplify some more. |
Date: |
Tue, 18 Mar 2014 17:51:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 782cf95222982a204b2447827e32d381eb97ff2b
Author: Nick Foster <address@hidden>
Date: Thu Mar 13 10:48:06 2014 -0700
Simplify some more.
---
gr-digital/lib/correlate_access_code_tag_bb_impl.cc | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
b/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
index 478dadc..f976676 100644
--- a/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
+++ b/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
@@ -86,8 +86,8 @@ namespace gr {
d_access_code = (d_access_code << 1) | (access_code[i] & 1);
}
if(VERBOSE) {
- std::cout << "Access code: " << std::hex << d_access_code <<
std::dec << std::endl;
- std::cout << "Mask: " << std::hex << d_mask << std::dec << std::endl;
+ std::cerr << "Access code: " << std::hex << d_access_code <<
std::dec << std::endl;
+ std::cerr << "Mask: " << std::hex << d_mask << std::dec << std::endl;
}
return true;
@@ -103,38 +103,31 @@ namespace gr {
uint64_t abs_out_sample_cnt = nitems_written(0);
- int size = noutput_items-d_len;
- if(size<=0) return 0;
-
- for(int i = 0; i < size; i++) {
+ for(int i = 0; i < noutput_items; i++) {
out[i] = in[i];
// compute hamming distance between desired access code and current data
uint64_t wrong_bits = 0;
uint64_t nwrong = d_threshold+1;
- int new_flag = 0;
wrong_bits = (d_data_reg ^ d_access_code) & d_mask;
volk_64u_popcnt(&nwrong, wrong_bits);
- // test for access code with up to threshold errors
- new_flag = (nwrong <= d_threshold);
-
// shift in new data and new flag
d_data_reg = (d_data_reg << 1) | (in[i] & 0x1);
- if(new_flag) {
+ if(nwrong <= d_threshold) {
if(VERBOSE)
std::cerr << "writing tag at sample " << abs_out_sample_cnt + i <<
std::endl;
add_item_tag(0, //stream ID
abs_out_sample_cnt + i, //sample
d_key, //frame info
- pmt::from_long(nwrong), //data (unused)
+ pmt::from_long(nwrong), //data (number wrong)
d_me //block src id
);
}
}
- return size;
+ return noutput_items;
}
} /* namespace digital */
- [Commit-gnuradio] [gnuradio] branch master updated (69dcaa7 -> d351818), git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 17/24: Merge remote-tracking branch 'smunaut/qtgui_fixes', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 05/24: grc: fix some PyGTK backwards compatibilty issues, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 07/24: gr-qtgui: Use dummy void* return value for pywidget if !ENABLE_PYTHON, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 11/24: grc: show dummy blocks when opening grc blocks, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 15/24: grc: tabbed probs: fix initial error box height, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 14/24: grc: tabbed props: no more double entries, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 06/24: qtgui: Adding a Number sink with options to set autoscale, layout style, colors, averaging., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 04/24: Simplify some more.,
git <=
- [Commit-gnuradio] [gnuradio] 03/24: Move correlate_access_code_tag_bb to non-deprecated GRC category and deprecate the older correlate_access_code_bb., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 20/24: Merge remote-tracking branch 'skoslowski/grc_show_missing_blocks', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 09/24: grc: tabbed PropsDialog, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 19/24: Merge remote-tracking branch 'gnuradio-wg-grc/grc_pygtk_backw_compat_fixes', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 12/24: grc: special colors for missing blocks, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 18/24: qtgui: fixes number sink to handle Python/C++ exposure (see: 6a78af5919133 and d9dbb6b489deb), git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 22/24: qtgui: fixing up a few minor details; include file and ability to set accumulate checkable on startup., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 10/24: Merge branch 'qtgui_numsink', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 02/24: Simplify correlate_access_code_tag_bb and fix bug leading to false trigger., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 23/24: Merge remote-tracking branch 'mbant/doxygen-updates', git, 2014/03/18