adjust throttle factor based on sample rate

This commit is contained in:
Sebastien Bourdeauducq 2020-09-26 20:33:49 +08:00
parent c499090cdb
commit aded9ddfbc
1 changed files with 3 additions and 1 deletions

4
dmi.py
View File

@ -1,3 +1,5 @@
from math import ceil
import SoapySDR import SoapySDR
import numpy as np import numpy as np
import gc import gc
@ -13,6 +15,7 @@ def main():
freq_sample = 1e6 freq_sample = 1e6
freq_base = 1088230e3 freq_base = 1088230e3
block_size = 4096 block_size = 4096
throttle_factor = ceil(freq_sample/125e3)
gui = GUI(freq_sample, freq_base, block_size) gui = GUI(freq_sample, freq_base, block_size)
try: try:
@ -36,7 +39,6 @@ def main():
buf_sdr.start() buf_sdr.start()
try: try:
throttle = 0 throttle = 0
throttle_factor = 8
position_acc = 0.0 position_acc = 0.0
while True: while True:
buffers = buf_sdr.get() buffers = buf_sdr.get()