Improve USB connection handling by preventing connection attempts when already connected
This commit is contained in:
1 parent
9a0572e8e4
commit
115689ad95
2 files changed
+93
-66
No files matched your search
@@ -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(() {
|
||||
|
||||
Reference in new issue
Block a user