summaryrefslogtreecommitdiff
path: root/gr-analog/python
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2019-05-14 18:05:21 +0200
committerMartin Braun <martin.braun@ettus.com>2019-05-22 20:34:41 -0700
commit388ccbd8c9ce5df7d194557f744a1e5089a89907 (patch)
tree40d6859d6138e0388bc4635f6aa44be1f52a480b /gr-analog/python
parent2c1c1907ea4fbc29976ae7b000bec15674fdd60a (diff)
analog: correct errors of automatic conversion script in fm_preemph
An automatic conversion for python3 mangled the source and introduced a bug. This commit fixes the conversion bug in fm_preemph. Changeset that lead to this bug still has to be analyzed further. Fixes #2286
Diffstat (limited to 'gr-analog/python')
-rw-r--r--gr-analog/python/analog/fm_emph.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-analog/python/analog/fm_emph.py b/gr-analog/python/analog/fm_emph.py
index a4cdedcf1b..602f1be3ea 100644
--- a/gr-analog/python/analog/fm_emph.py
+++ b/gr-analog/python/analog/fm_emph.py
@@ -289,7 +289,8 @@ class fm_preemph(gr.hier_block2):
# That isn't what users are going to expect, so adjust with a
# gain, g, so that H(z = 1) = 1.0 for 0 dB gain at DC.
w_0dB = 2.0 * math.pi * 0.0
- g = abs(1.0 - p1 * cmath.rect(1.0 / -w_0dB), (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB))))
+ g = abs(1.0 - p1 * cmath.rect(1.0 / -w_0dB)) \
+ / (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB)))
btaps = [ g * b0 * 1.0, g * b0 * -z1 ]
ataps = [ 1.0, -p1 ]