mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-20 01:15:35 +10:00
Improve USB connection handling by preventing connection attempts when already connected
This commit is contained in:
committed by
just-stuff-tm
parent
9a0572e8e4
commit
115689ad95
@@ -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