kamil_adc support added
This commit is contained in:
@@ -372,6 +372,15 @@ def run_config_from_dict(payload: dict[str, Any]) -> RunConfigModel:
|
||||
def run_config_to_dict(model: RunConfigModel) -> dict[str, Any]:
|
||||
"""Encode :class:`RunConfigModel` to C++ pipeline-compatible JSON structure."""
|
||||
model.ensure_combos()
|
||||
sweep_payload = {
|
||||
"start_hz": model.radar.sweep.start_hz,
|
||||
"stop_hz": model.radar.sweep.stop_hz,
|
||||
"if_bandwidth_hz": model.radar.sweep.if_bandwidth_hz,
|
||||
"stimulus_power_dbm": model.radar.sweep.power_dbm,
|
||||
}
|
||||
if not model.is_kamil_adc:
|
||||
sweep_payload["points"] = model.radar.sweep.points
|
||||
|
||||
return {
|
||||
"radar": {
|
||||
"model": model.radar.model,
|
||||
@@ -422,13 +431,7 @@ def run_config_to_dict(model: RunConfigModel) -> dict[str, Any]:
|
||||
"delay_time": model.radar.laser_control.variation.delay_time,
|
||||
},
|
||||
},
|
||||
"sweep": {
|
||||
"start_hz": model.radar.sweep.start_hz,
|
||||
"stop_hz": model.radar.sweep.stop_hz,
|
||||
"points": model.radar.sweep.points,
|
||||
"if_bandwidth_hz": model.radar.sweep.if_bandwidth_hz,
|
||||
"stimulus_power_dbm": model.radar.sweep.power_dbm,
|
||||
},
|
||||
"sweep": sweep_payload,
|
||||
},
|
||||
"switches": {
|
||||
"port1": {
|
||||
|
||||
Reference in New Issue
Block a user