refactor: standardize codebase formatting, optimize import orders, and update GUI resolution to 1080p

This commit is contained in:
jack
2026-06-18 13:13:47 -07:00
parent 8ad2a9b972
commit 66942d250d
32 changed files with 453 additions and 120 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ QML via @Slot methods on a QObject controller.
"""
import logging
from pathlib import Path
from typing import Optional
import serial.tools.list_ports
@@ -42,8 +41,8 @@ class DeviceService:
# On macOS/Linux, also detect virtual loopback serial ports (PTYs) opened by socat
import platform
import subprocess
import re
import subprocess
if platform.system() in ("Darwin", "Linux"):
try:
+3 -2
View File
@@ -1,5 +1,6 @@
"""Continuous serial frame reader (Live-mode source)"""
from __future__ import annotations
import logging
import threading
import time
@@ -13,7 +14,7 @@ log = logging.getLogger(__name__)
ParseFrame = Callable[[bytes, int], Frame]
class StreamReader:
def __init__(self, transport, parse_frame: ParseFrame,
on_frame: Callable[[Frame], None],
on_error: Callable[[Exception], None] | None = None,
@@ -26,7 +27,7 @@ class StreamReader:
self._thread: threading.Thread | None = None
self._stop = threading.Event()
self.error_count = 0
def start(self) -> None:
self._stop.clear()
self._thread = threading.Thread(target=self._run, daemon = True)