mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-27 22:16:37 +10:00
Update active USB port key and label on connection, notify listeners
This commit is contained in:
committed by
just-stuff-tm
parent
3cef9e81b6
commit
d6d11eaad2
@@ -975,6 +975,10 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||||||
await _usbFrameSubscription?.cancel();
|
await _usbFrameSubscription?.cancel();
|
||||||
_usbFrameSubscription = null;
|
_usbFrameSubscription = null;
|
||||||
await _usbSerialService.connect(portName: portName, baudRate: baudRate);
|
await _usbSerialService.connect(portName: portName, baudRate: baudRate);
|
||||||
|
_activeUsbPortKey = _usbSerialService.activePortKey ?? _activeUsbPortKey;
|
||||||
|
_activeUsbPortLabel =
|
||||||
|
_usbSerialService.activePortDisplayLabel ?? _activeUsbPortLabel;
|
||||||
|
notifyListeners();
|
||||||
if (PlatformInfo.isWeb) {
|
if (PlatformInfo.isWeb) {
|
||||||
await stopScan();
|
await stopScan();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user