Skip to content
Snippets Groups Projects
Commit 9a9498a7 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

fix typo

parent ffcdeecf
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ SAMPLING_RATE_HZ = 22000
SAMPLING_FREQ_TO_HIGH = -2
SAMPLING_FREQ_TO_LOW = -1
class AdcDevice:
def __init__(self, device_nr, rate=SAMPLING_RATE_HZ, samples=SAMPLES):
self.__lock = asyncio.Lock()
......@@ -199,7 +200,7 @@ def calculate_frequency(voltages_centered, sampling_rate):
count_mean = sum(counts) / len(counts)
if count_mean < 5:
return SAMPLING_FREQ_TO_LOW
f = sampling_rate / (2 * count_meant)
f = sampling_rate / (2 * count_mean)
count = None
return f
......
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