0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

change error logic

This commit is contained in:
Kuba
2025-03-11 13:12:13 +01:00
committed by GitHub
parent 4da61d3d6c
commit f1c0a025f4

View File

@@ -49,7 +49,7 @@ def generate_bit(name):
offset = int(sample_rate*0.004) # 190 khz = 760
count = int(offset / 10**(len(str(offset)) - 1)) # 760 / 100 = 7
l = int(sample_rate / 1187.5) // 2 # 16/2 = 8
if count*l < 2*l: raise Exception("Sample rate too small")
if l == 1: raise Exception("Sample rate too small")
sample = numpy.zeros(count*l)
sample[l] = 1