Minor edits.

git-svn-id: http://op25.osmocom.org/svn/trunk@261 65a5c917-d112-43f1-993d-58c26a4786be
This commit is contained in:
stevie 2011-01-27 21:13:19 +00:00
parent 07d9c9f91a
commit 8fc4c855c6
3 changed files with 5 additions and 21 deletions

View File

@ -74,7 +74,7 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_CHECK_FUNCS([])
AC_CHECK_LIB([pcap], [pcap_open_live, pcap_open_dead, pcap_close, pcap_next, pcap_next_ex, pcap_datalink, pcap_inject, pcap_dump, pcap_geterr], , AC_MSG_ERROR([libpcap library not found.]))
dnl Check for Mingw support
GR_PWIN32

View File

@ -80,24 +80,8 @@ op25_decoder_bf::general_work(int nof_output_items, gr_vector_int& nof_input_ite
try {
// process input
/*
const float *in = reinterpret_cast<const float*>(input_items[0]);
*/
const uint8_t *in = reinterpret_cast<const uint8_t*>(input_items[0]);
for(int i = 0; i < nof_input_items[0]; ++i) {
/*
dibit d;
if(in[i] < -2.0) {
d = 3;
} else if(in[i] < 0.0) {
d = 2;
} else if(in[i] < 2.0) {
d = 0;
} else {
d = 1;
}
receive_symbol(d);
*/
dibit d = in[i] & 0x3;
receive_symbol(d);
}

View File

@ -37,11 +37,11 @@ class qa_op25(gr_unittest.TestCase):
self.fg = None
def test_constructor(self):
framing_sequence = (3, 3, 3, 3, 3, -3, 3, 3, -3, -3, 3, 3, -3, -3, -3, -3, 3, -3, 3, -3, -3, -3, -3, -3)
src = gr.vector_source_f(framing_sequence, False)
# framing_sequence = (3, 3, 3, 3, 3, -3, 3, 3, -3, -3, 3, 3, -3, -3, -3, -3, 3, -3, 3, -3, -3, -3, -3, -3)
# src = gr.vector_source_f(framing_sequence, False)
msgq = gr.msg_queue()
p25 = op25.decoder_ff(msgq)
self.fg.connect(src, p25)
p25 = op25.decoder_bf(msgq)
# self.fg.connect(src, p25)
# ToDo: add test cases!