new kamil adc
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from python_app.gui.preprocess_dialog import PreprocessDialog
|
||||
from python_app.hardware_full.kamil_adc_service import KamilAdcService
|
||||
from python_app.orchestration.preprocess_assets import (
|
||||
PREPROCESS_ASSET_SPECS,
|
||||
VISIBLE_PREPROCESS_ASSET_KEYS,
|
||||
@@ -429,8 +428,8 @@ class AppWindowPreprocessMixin:
|
||||
self._stop_run()
|
||||
pipeline_was_paused = True
|
||||
|
||||
point_count = self._read_kamil_adc_point_count(config)
|
||||
calibration, reference = build_kamil_adc_neutral_s21_sets(config, point_count)
|
||||
calibration, reference = build_kamil_adc_neutral_s21_sets(config)
|
||||
point_count = config.radar.kamil_adc.band.points
|
||||
self._store.save_set("s21_calibration", radar_key, set_name, calibration)
|
||||
self._store.save_set("s21_reference", radar_key, set_name, reference)
|
||||
|
||||
@@ -454,25 +453,6 @@ class AppWindowPreprocessMixin:
|
||||
if pipeline_was_paused:
|
||||
self._start_run()
|
||||
|
||||
def _read_kamil_adc_point_count(self, config) -> int:
|
||||
"""Read one Kamil ADC sweep and return its actual point count."""
|
||||
dialog = self._ensure_preprocess_dialog()
|
||||
dialog.set_status("Reading one Kamil ADC sweep to detect point count...")
|
||||
self._log("Reading one Kamil ADC sweep to detect neutral-set point count")
|
||||
|
||||
radar = KamilAdcService(config)
|
||||
try:
|
||||
radar.open()
|
||||
radar.configure(config.radar.sweep)
|
||||
sweep = radar.acquire()
|
||||
finally:
|
||||
radar.close()
|
||||
|
||||
point_count = int(sweep.x.size)
|
||||
if point_count <= 0:
|
||||
raise RuntimeError("Kamil ADC returned an empty sweep while detecting point count")
|
||||
return point_count
|
||||
|
||||
def _build_single_radar_capture_session(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user