Files
RFG_stm32_ADC_receiver_GUI/rfg_adc_plotter/main.py
2026-03-12 15:12:20 +03:00

27 lines
673 B
Python

"""Main entrypoint for the modularized ADC plotter."""
from __future__ import annotations
import sys
from rfg_adc_plotter.cli import build_parser
def main() -> None:
args = build_parser().parse_args()
if args.backend == "mpl":
sys.stderr.write("[error] Matplotlib backend removed. Use --backend pg or --backend auto.\n")
raise SystemExit(2)
from rfg_adc_plotter.gui.pyqtgraph_backend import run_pyqtgraph
try:
run_pyqtgraph(args)
except Exception as exc:
sys.stderr.write(f"[error] PyQtGraph бэкенд недоступен: {exc}\n")
raise SystemExit(1) from exc
if __name__ == "__main__":
main()