27 lines
673 B
Python
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()
|