Improve USB connection handling by preventing connection attempts when already connected

This commit is contained in:
just_stuff_tm authored and just-stuff-tm committed 2026-03-05 02:25:05 -05:00
1 parent 9a0572e8e4
commit 115689ad95
2 files changed
+93 -66

No files matched your search

+7
View File
@@ -425,6 +425,13 @@ class _UsbScreenState extends State<UsbScreen> {
if (selectedPort == null || selectedPort.isEmpty) {
return;
}
if (_connector.state != MeshCoreConnectionState.disconnected) {
setState(() {
_isConnecting = false;
_errorText = null;
});
return;
}
final rawPortName = normalizeUsbPortName(selectedPort);
setState(() {