From 9a9498a702d2e3663a03774fd17529e8138e99ee Mon Sep 17 00:00:00 2001
From: Andreas Gattringer <andreas.gattringer@univie.ac.at>
Date: Thu, 1 Aug 2024 08:04:06 +0200
Subject: [PATCH] fix typo

---
 programs/dmatest_v2.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/dmatest_v2.py b/programs/dmatest_v2.py
index 56d0afe..410d543 100644
--- a/programs/dmatest_v2.py
+++ b/programs/dmatest_v2.py
@@ -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
 
-- 
GitLab