Merge remote-tracking branch 'origin/dev' into fix/usb-serial-nonblocking-close
# Conflicts: # pubspec.yaml
This commit is contained in:
commit
8b8715cfda
132 files changed
+16943
-3604
No files matched your search
@@ -558,7 +558,9 @@ class UsbSerialService {
|
||||
return;
|
||||
}
|
||||
if (data is ByteData) {
|
||||
_ingestRawBytes(data.buffer.asUint8List());
|
||||
_ingestRawBytes(
|
||||
data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes),
|
||||
);
|
||||
return;
|
||||
}
|
||||
_addFrameError(
|
||||
@@ -571,7 +573,11 @@ class UsbSerialService {
|
||||
}
|
||||
|
||||
void _handleSerialDone() {
|
||||
final wasConnected = _status == UsbSerialStatus.connected;
|
||||
unawaited(disconnect());
|
||||
if (wasConnected) {
|
||||
_addFrameError(StateError('USB serial connection closed'));
|
||||
}
|
||||
}
|
||||
|
||||
void _ingestRawBytes(Uint8List bytes) {
|
||||
|
||||
Reference in new issue
Block a user