Skip to content
Snippets Groups Projects
Verified Commit 7037ea46 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Improve queue handling in AHRS calib

parent 216d540d
No related branches found
No related tags found
No related merge requests found
Pipeline #23596 passed
......@@ -59,7 +59,8 @@ class CalibrateAHRS(kp.Module):
self.cuckoo_log = kp.time.Cuckoo(10, self.cprint)
self.data = {}
self.queue_size = 100000
self.scale_down_factor = 1000
self.queue_size = int(self.detector.n_doms * 10 * self.time_range * 60**2 / det.n_dus / self.scale_down_factor)
self.lock = threading.Lock()
self.index = 0
......@@ -76,7 +77,7 @@ class CalibrateAHRS(kp.Module):
def process(self, blob):
self.index += 1
if self.index % 29 != 0:
if self.index % self.scale_down_factor != 0:
return blob
now = datetime.utcnow()
tmch_data = TMCHData(io.BytesIO(blob['CHData']))
......
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