Enhance USB error handling and improve user feedback

- Updated the _friendlyErrorMessage method in UsbScreen to provide more user-friendly error messages based on specific PlatformException codes.
- Added localized error messages for various USB-related errors, improving clarity for users.
- Modified the UsbSerialService to rethrow exceptions instead of throwing StateError, allowing for better error propagation.
- Updated the usb_flow_test to reflect changes in the USB display label behavior, ensuring the test accurately describes the functionality.
This commit is contained in:
just_stuff_tm
2026-03-03 15:04:22 -05:00
committed by just-stuff-tm
parent 5b4535d5dc
commit 38d40ca0a4
34 changed files with 15499 additions and 15317 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
{
{
"@@locale": "en",
"appTitle": "MeshCore Open",
"nav_contacts": "Contacts",
@@ -53,6 +53,18 @@
"usbScreenStatus": "Select a USB device",
"usbScreenNote": "USB serial is active on supported Android devices and desktop platforms.",
"usbScreenEmptyState": "No USB devices found. Plug one in and refresh.",
"usbErrorPermissionDenied": "USB permission was denied.",
"usbErrorDeviceMissing": "The selected USB device is no longer available.",
"usbErrorInvalidPort": "Select a valid USB device.",
"usbErrorBusy": "Another USB connection request is already in progress.",
"usbErrorNotConnected": "No USB device is connected.",
"usbErrorOpenFailed": "Failed to open the selected USB device.",
"usbErrorConnectFailed": "Failed to connect to the selected USB device.",
"usbErrorUnsupported": "USB serial is not supported on this platform.",
"usbErrorAlreadyActive": "A USB connection is already active.",
"usbErrorNoDeviceSelected": "No USB device was selected.",
"usbErrorPortClosed": "The USB connection is not open.",
"usbErrorConnectTimedOut": "Timed out waiting for the device to respond.",
"scanner_scanning": "Scanning for devices...",
"scanner_connecting": "Connecting...",
"scanner_disconnecting": "Disconnecting...",