Rework radar system

This commit is contained in:
Ayzen
2026-10-06 12:32:26 +03:00
parent 552cdc688a
commit 5bb86b7165
299 changed files with 13537 additions and 27763 deletions
+2 -12
View File
@@ -3,7 +3,6 @@
from __future__ import annotations
from contextlib import suppress
import os
from pathlib import Path
import signal
import sys
@@ -17,20 +16,11 @@ PROJECT_ROOT = Path(__file__).resolve().parents[2]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
from python_app.gui.settings_defaults import env_enabled
from python_app.gui.app_window import AppWindow
from python_app.gui.theme import apply_light_theme
def _is_headless() -> bool:
"""Return whether the launcher requested a non-interactive deployment."""
return os.environ.get("RADAR_SYSTEM_HEADLESS", "").strip().lower() in {
"1",
"true",
"yes",
"on",
}
def _install_unix_signal_handlers(app: QApplication, window: AppWindow) -> None:
"""Route SIGINT and SIGTERM through the Qt event loop into a clean shutdown.
@@ -67,7 +57,7 @@ def main() -> int:
# PyQtGraph foreground controls axis lines, tick text, labels, and titles.
pg.setConfigOptions(antialias=True, background="#ffffff", foreground="#ffffff")
window = AppWindow(PROJECT_ROOT)
if _is_headless():
if env_enabled("RADAR_SYSTEM_HEADLESS"):
_install_unix_signal_handlers(app, window)
else:
window.showMaximized()