Skip to content
Snippets Groups Projects
Commit 76d9862c authored by Gabriel Fedel's avatar Gabriel Fedel :speech_balloon:
Browse files

Fix float2Qmn function name

parent f6f095ad
No related branches found
No related tags found
1 merge request!16Test control tables
......@@ -45,7 +45,7 @@ def readReg(board, reg):
return ret
def flot2Qmn(val, m, n, signed):
def float2Qmn(val, m, n, signed):
pow_2_frac_bits = float(0x1 << n)
pow_2_frac_bits_int_bits = float(0x1 << (m + n))
......@@ -102,9 +102,9 @@ class TestLowPass(unittest.TestCase):
res = self.calc_consts(cutoff, fsamp, n)
a = flot2Qmn(res[0], 1, 15, 1)
a = float2Qmn(res[0], 1, 15, 1)
self.assertNotEqual(a, nan)
b = flot2Qmn(res[1], 1, 15, 1)
b = float2Qmn(res[1], 1, 15, 1)
self.assertNotEqual(b, nan)
a = hex(a)
......@@ -151,13 +151,13 @@ class TestNotch(unittest.TestCase):
res = self.calc_consts(bwidth, freq, fsamp, n)
areal = flot2Qmn(res[0], 1, 15, 1)
areal = float2Qmn(res[0], 1, 15, 1)
self.assertNotEqual(areal, nan)
aimag = flot2Qmn(res[1], 1, 15, 1)
aimag = float2Qmn(res[1], 1, 15, 1)
self.assertNotEqual(aimag, nan)
breal = flot2Qmn(res[2], 1, 15, 1)
breal = float2Qmn(res[2], 1, 15, 1)
self.assertNotEqual(breal, nan)
bimag = flot2Qmn(res[3], 1, 15, 1)
bimag = float2Qmn(res[3], 1, 15, 1)
self.assertNotEqual(bimag, nan)
reg1exp = hex((areal << 16) | aimag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment