audio fixes attempt
CI / lint (push) Failing after 6s
CI / test (push) Successful in 19s
Build edge-node / build (push) Successful in 7m54s
Build op25 / build (push) Successful in 1h25m50s

This commit is contained in:
Logan
2026-05-23 14:59:48 -04:00
parent dccbab00d6
commit 16f6e0de95
4 changed files with 41 additions and 3 deletions
+9
View File
@@ -107,6 +107,7 @@ def _to_hz(freq) -> int:
async def _generate_op25_config(config: SystemConfig) -> bool:
"""Translate a SystemConfig (Firestore format) into OP25 active.cfg.json + op25.liq."""
from app.internal.op25_client import op25_client
node_cfg = load_node_config()
raw = config.config
payload = {
"type": config.type,
@@ -124,12 +125,16 @@ async def _generate_op25_config(config: SystemConfig) -> bool:
"icecast_mountpoint": settings.icecast_mount,
"icecast_password": settings.icecast_source_password,
},
"hardware_preset": node_cfg.hardware_preset,
**({"ppm_override": node_cfg.ppm_override} if node_cfg.ppm_override is not None else {}),
}
return await op25_client.generate_config(payload)
async def on_config_push(payload: dict):
"""C2 pushes a system config — translate it to OP25 format and restart OP25."""
hardware_preset = payload.pop("hardware_preset", None)
ppm_override = payload.pop("ppm_override", None)
try:
config = SystemConfig(**payload)
except Exception as e:
@@ -140,6 +145,10 @@ async def on_config_push(payload: dict):
node_cfg.assigned_system_id = config.system_id
node_cfg.system_config = config
node_cfg.configured = True
if hardware_preset is not None:
node_cfg.hardware_preset = hardware_preset
if ppm_override is not None:
node_cfg.ppm_override = float(ppm_override)
save_node_config(node_cfg)
from app.internal.op25_client import op25_client
+2
View File
@@ -31,6 +31,8 @@ class NodeConfig(BaseModel):
assigned_system_id: Optional[str] = None
system_config: Optional[SystemConfig] = None
configured: bool = False
hardware_preset: str = "rtl-sdr-v3"
ppm_override: Optional[float] = None
class CallEvent(BaseModel):