summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-11-27 14:38:38 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2016-11-27 14:38:38 -0800
commit521729b2ccb483cbccf83fb23ffbdecbb68ad8df (patch)
treec767b47fb7d280828aa92ff4a3704a9ee0151e0d
parente28e7d0ddc46ebe2a70e67420f243b0f5eedb281 (diff)
parentdb1a0a96785577c20dd254e6825eac050cf4d59b (diff)
Merge branch 'master' into next
-rw-r--r--gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc2
-rw-r--r--gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc3
-rw-r--r--gr-dtv/lib/dvb/dvb_bch_bb_impl.cc2
-rw-r--r--gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc8
-rw-r--r--gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc1
-rw-r--r--gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc1
-rw-r--r--gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc2
-rw-r--r--gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc2
-rw-r--r--gr-utils/python/modtool/gr-newmod/CMakeLists.txt17
-rw-r--r--grc/core/Block.py5
-rw-r--r--grc/core/utils/epy_block_io.py8
11 files changed, 37 insertions, 14 deletions
diff --git a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc
index d14b46a0e1..123e7fb15e 100644
--- a/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc
+++ b/gr-dtv/lib/dvb/dvb_bbheader_bb_impl.cc
@@ -326,7 +326,7 @@ namespace gr {
void
dvb_bbheader_bb_impl::build_crc8_table(void)
{
- int r,crc;
+ int r, crc;
for (int i = 0; i < 256; i++) {
r = i;
diff --git a/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc
index ef1c1841ad..8e86eb4f64 100644
--- a/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc
+++ b/gr-dtv/lib/dvb/dvb_bbscrambler_bb_impl.cc
@@ -279,8 +279,7 @@ namespace gr {
unsigned char *out = (unsigned char *) output_items[0];
for (int i = 0; i < noutput_items; i += kbch) {
- for (int j = 0; j < (int)kbch; ++j)
- {
+ for (int j = 0; j < (int)kbch; ++j) {
out[i + j] = in[i + j] ^ bb_randomise[j];
}
}
diff --git a/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc b/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc
index b1ebb6db79..8d89f9b04a 100644
--- a/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc
+++ b/gr-dtv/lib/dvb/dvb_bch_bb_impl.cc
@@ -385,7 +385,7 @@ namespace gr {
void
dvb_bch_bb_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required)
{
- ninput_items_required[0] = (noutput_items / nbch) * kbch;
+ ninput_items_required[0] = (noutput_items / nbch) * kbch;
}
/*
diff --git a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc
index 568aac940a..84328e1200 100644
--- a/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc
+++ b/gr-dtv/lib/dvb/dvb_ldpc_bb_impl.cc
@@ -369,12 +369,12 @@ namespace gr {
void
dvb_ldpc_bb_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required)
{
- ninput_items_required[0] = (noutput_items / frame_size) * nbch;
+ ninput_items_required[0] = (noutput_items / frame_size) * nbch;
}
#define LDPC_BF(TABLE_NAME, ROWS) \
for (int row = 0; row < ROWS; row++) { \
- for(int n = 0; n < 360; n++) { \
+ for (int n = 0; n < 360; n++) { \
for (int col = 1; col <= TABLE_NAME[row][0]; col++) { \
ldpc_encode.p[index] = (TABLE_NAME[row][col] + (n * q)) % pbits; \
ldpc_encode.d[index] = im; \
@@ -606,7 +606,7 @@ for (int row = 0; row < ROWS; row++) { \
unsigned char *out = (unsigned char *) output_items[0];
const unsigned char *d;
unsigned char *p;
- unsigned char *b;
+ unsigned char *b = (unsigned char *) output_items[0];
unsigned char *s;
// Calculate the number of parity bits
int plen = (frame_size_real + Xp) - nbch;
@@ -657,7 +657,7 @@ for (int row = 0; row < ROWS; row++) { \
p[j] ^= p[j-1];
}
if (signal_constellation == MOD_128APSK) {
- for(int j = 0; j < 6; j++) {
+ for (int j = 0; j < 6; j++) {
p[j + plen] = 0;
}
}
diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
index 3ae1debb01..e3fb039c50 100644
--- a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
+++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
@@ -53,6 +53,7 @@ namespace gr {
m_bpsk[0][1] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(5.0 * M_PI / 4.0)));
m_bpsk[1][0] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
m_bpsk[1][1] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(5.0 * M_PI /4.0)));
+ break;
case MOD_QPSK:
m_qpsk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
m_qpsk[1] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
index 688ad7a40c..5da18b1d21 100644
--- a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
+++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
@@ -71,6 +71,7 @@ namespace gr {
}
else {
frame_size = FRAME_SIZE_MEDIUM - MEDIUM_PUNCTURING + EXTRA_PILOT_SYMBOLS_SET1;
+ type = 0;
pilots = PILOTS_ON; /* force pilots on for VL-SNR */
}
diff --git a/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
index f89d2af7f7..bda49e9540 100644
--- a/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
+++ b/gr-dtv/lib/dvbt2/dvbt2_freqinterleaver_cc_impl.cc
@@ -186,6 +186,8 @@ namespace gr {
max_states = 0;
logic = &logic1k[0];
xor_size = 0;
+ bitpermeven = &bitperm1keven[0];
+ bitpermodd = &bitperm1kodd[0];
break;
}
switch (fftsize) {
diff --git a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
index 28e7c4fac2..b92738603b 100644
--- a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
+++ b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
@@ -500,7 +500,7 @@ namespace gr {
void
dvbt2_modulator_bc_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required)
{
- ninput_items_required[0] = noutput_items;
+ ninput_items_required[0] = noutput_items;
}
int
diff --git a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
index bde9dc0c0f..3f316a78b4 100644
--- a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
@@ -46,6 +46,23 @@ set(VERSION_INFO_API_COMPAT 0)
set(VERSION_INFO_MINOR_VERSION 0)
set(VERSION_INFO_MAINT_VERSION git)
+# Set cmake policies.
+# This will suppress developer warnings during the cmake process that can occur
+# if a newer cmake version than the minimum is used.
+
+if(POLICY CMP0026)
+ cmake_policy(SET CMP0026 OLD)
+endif()
+if(POLICY CMP0043)
+ cmake_policy(SET CMP0043 OLD)
+endif()
+if(POLICY CMP0045)
+ cmake_policy(SET CMP0045 OLD)
+endif()
+if(POLICY CMP0046)
+ cmake_policy(SET CMP0046 OLD)
+endif()
+
########################################################################
# Compiler specific setup
########################################################################
diff --git a/grc/core/Block.py b/grc/core/Block.py
index de1d83ee9a..fba9371963 100644
--- a/grc/core/Block.py
+++ b/grc/core/Block.py
@@ -461,10 +461,11 @@ class Block(Element):
iter_ports = iter(ports)
ports_new = []
port_current = next(iter_ports, None)
- for key, port_type in port_specs:
+ for key, port_type, vlen in port_specs:
reuse_port = (
port_current is not None and
port_current.get_type() == port_type and
+ port_current.get_vlen() == vlen and
(key.isdigit() or port_current.get_key() == key)
)
if reuse_port:
@@ -475,6 +476,8 @@ class Block(Element):
if port_type == 'message':
n['name'] = key
n['optional'] = '1'
+ if vlen > 1:
+ n['vlen'] = str(vlen)
port = platform.Port(block=self, n=n, dir=direction)
ports_new.append(port)
# replace old port list with new one
diff --git a/grc/core/utils/epy_block_io.py b/grc/core/utils/epy_block_io.py
index 4eb4d6d4e5..53a1bb3c72 100644
--- a/grc/core/utils/epy_block_io.py
+++ b/grc/core/utils/epy_block_io.py
@@ -17,14 +17,15 @@ BlockIO = collections.namedtuple('BlockIO', 'name cls params sinks sources doc c
def _ports(sigs, msgs):
ports = list()
for i, dtype in enumerate(sigs):
- port_type = TYPE_MAP.get(dtype.name, None)
+ port_type = TYPE_MAP.get(dtype.base.name, None)
if not port_type:
raise ValueError("Can't map {0!r} to GRC port type".format(dtype))
- ports.append((str(i), port_type))
+ vlen = dtype.shape[0] if len(dtype.shape) > 0 else 1
+ ports.append((str(i), port_type, vlen))
for msg_key in msgs:
if msg_key == 'system':
continue
- ports.append((msg_key, 'message'))
+ ports.append((msg_key, 'message', None))
return ports
@@ -122,4 +123,3 @@ class blk(gr.sync_block):
"""
from pprint import pprint
pprint(dict(extract(blk_code)._asdict()))
-