feat(studio): AR Electronics branding + Telemetría + Instalar J6412 tabs

ar_style.py — global QSS dark theme + QPalette matching the Flutter brand
  palette (navy #0D1B2A, electric blue #2563EB, glow #60B8FF). Single call:
  apply_ar_style(app).

app.py — applies AR style and window icon on startup.

main_window.py — complete rewrite of the layout:
  - Sidebar: AR logo (PNG), user/role display, capabilities list, version stamp
  - 5 tabs: Overview ·  Flash ESP32 · 📋 Proyecto · 📡 Telemetría · 💾 Instalar J6412
  - Overview tab: rich-text guide with icons for each tab's purpose

telemetry_widget.py — live $PARP STATUS chart tab:
  - QSerialPort RX-only connection to AR-Concentrador (port selector + Refresh)
  - Python $PARP XOR-checksum parser (mirrors Dart ParpCodec)
  - _RollingChart: pure QPainter scrolling time-series, 60 s window, no
    external charting library
  - Heading + Setpoint on one chart; Rudder on a second chart
  - Live value strip shows Rumbo / Setpoint / Timón + mode label

installer_widget.py — J6412 USB image builder tab:
  - Vessel name + serial number (auto-generate or paste)
  - Optional CSV log path for CRM
  - App checkboxes (AR-ECDIS / AR-Autopilot / skip Flutter build)
  - Worker thread runs installer/build_usb.py with streamed log output
  - "Abrir dist/" button when build succeeds
  - RBAC gated: Engineer or Super Admin only

pyproject.toml — adds [installer] and [license-server] optional dep groups

AR_electronics — AR-Autopilot Project
This commit is contained in:
2026-05-24 11:22:38 -04:00
parent de25dcee57
commit 5238bd31f0
6 changed files with 1203 additions and 44 deletions
+15
View File
@@ -22,6 +22,8 @@ import argparse
import sys
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[2]
from arautopilot.core.audit import AuditLog
from arautopilot.core.user_store import UserStore, seed_demo_users
from arautopilot.studio.session import studio_data_dir
@@ -81,6 +83,19 @@ def run(argv: list[str] | None = None) -> int:
app = QApplication(sys.argv)
app.setApplicationName("AR-Autopilot Studio")
# Apply AR Electronics brand theme
from arautopilot.studio.ar_style import apply_ar_style # noqa: PLC0415
apply_ar_style(app)
# Window icon (logo)
from PySide6.QtGui import QIcon # noqa: PLC0415
from pathlib import Path as _Path # noqa: PLC0415
_logo = REPO_ROOT / "display" / "assets" / "images" / "ar_logo_full.png"
if not _logo.exists():
_logo = _Path(__file__).resolve().parents[2] / "display" / "assets" / "images" / "ar_logo_full.png"
if _logo.exists():
app.setWindowIcon(QIcon(str(_logo)))
if len(user_store) == 0:
QMessageBox.information(
None,