fix: auto-start UART monitoring on port open success
_on_open_success(): directly call _on_start() instead of just enabling the button. User no longer needs to click Start — monitoring begins automatically when the port is available. Start/Stop buttons remain for manual control.
This commit is contained in:
+3
-3
@@ -928,11 +928,11 @@ class UartMonitorWindow(ctk.CTkToplevel):
|
||||
threading.Thread(target=_bg_open, daemon=True).start()
|
||||
|
||||
def _on_open_success(self) -> None:
|
||||
"""Serial port opened — enable Start button."""
|
||||
"""Serial port opened — auto-start monitoring."""
|
||||
self._is_opening = False
|
||||
self._start_btn.configure(state="normal")
|
||||
self._update_status(ACCENT_PENDING, "Ready")
|
||||
self._log(f"[{self._port}] Port ready. Click Start to begin monitoring.\n")
|
||||
self._log(f"[{self._port}] Port ready, auto-starting monitor...\n")
|
||||
self._on_start()
|
||||
|
||||
def _show_unavailable(self, reason: str) -> None:
|
||||
"""Show UART unavailable state."""
|
||||
|
||||
Reference in New Issue
Block a user