Added buffer autosave and fixed slow comports() call by delocalizing to thread

This commit is contained in:
2026-05-18 21:47:02 +02:00
parent e5fd5cda89
commit a69b45ed27
11 changed files with 165 additions and 55 deletions

View File

@@ -2,6 +2,7 @@
# Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
from datetime import datetime
from pathlib import Path
import sys
from threading import Thread
@@ -40,6 +41,7 @@ def _asset_path(relative_path: str) -> str:
def run() -> None:
state: AppState = AppState()
state.start_time = datetime.now()
# Create application context and viewport
dpg.create_context()
@@ -91,6 +93,12 @@ def run() -> None:
)
state.telemetry_thread.start()
state.ports_thread_running = True
state.ports_thread = Thread(
target=dataflux.ui.worker.ports_worker, args=(state,), daemon=True
)
state.ports_thread.start()
dpg.start_dearpygui()
dpg.destroy_context()