add notifications for firmware flash errors

This commit is contained in:
David Lechner
2021-01-23 15:27:36 -06:00
parent 1a6f77ece3
commit 5d1311216c
4 changed files with 130 additions and 0 deletions
+15
View File
@@ -13,6 +13,21 @@
"action": "Reload"
}
},
"flashFirmware": {
"connectionFailed": "Could not connect to the hub. Restart the hub and try again.",
"timedOut": "The hub took too long to respond. Restart the hub and try again.",
"bleError": "There was a problem with Bluetooth.",
"disconnected": "The hub was disconnected before flashing was completed. Restart the hub and try again.",
"hubError": "The hub said something went wrong.",
"unsupportedDevice": "The connected hub is not supported.",
"deviceMismatch": "The firmware is for a different kind of hub from the connected hub.",
"failToFetch": "Failed to fetch firmware from the server: {status}",
"badZipFile": "The firmware.zip file is missing required files or is corrupt.",
"badMetadata": "The firmware.metadata.py file contains missing or invalid entries. Fix it then try again.",
"compileError": "The included main.py file could not be compiled. Fix it then try again.",
"sizeTooBig": "The combined firmware and main.py are too big to fit in the flash memory.",
"unexpectedError": "Unexpected error while trying to flash firmware: {errorMessage}"
},
"mpy": {
"error": "{errorMessage}"
},
+13
View File
@@ -10,6 +10,19 @@ export enum MessageId {
BleGattPermission = 'ble.gattPermission',
BleGattServiceNotFound = 'ble.gattServiceNotFound',
BleNoWebBluetooth = 'ble.noWebBluetooth',
FlashFirmwareConnectionFailed = 'flashFirmware.connectionFailed',
FlashFirmwareTimedOut = 'flashFirmware.timedOut',
FlashFirmwareBleError = 'flashFirmware.bleError',
FlashFirmwareDisconnected = 'flashFirmware.disconnected',
FlashFirmwareHubError = 'flashFirmware.hubError',
FlashFirmwareUnsupportedDevice = 'flashFirmware.unsupportedDevice',
FlashFirmwareDeviceMismatch = 'flashFirmware.deviceMismatch',
FlashFirmwareFailToFetch = 'flashFirmware.failToFetch',
FlashFirmwareBadZipFile = 'flashFirmware.badZipFile',
FlashFirmwareBadMetadata = 'flashFirmware.badMetadata',
FlashFirmwareCompileError = 'flashFirmware.compileError',
FlashFirmwareSizeTooBig = 'flashFirmware.sizeTooBig',
FlashFirmwareUnexpectedError = 'flashFirmware.unexpectedError',
ProgramChangedMessage = 'editor.programChanged.message',
ProgramChangedAction = 'editor.programChanged.action',
ServiceWorkerUpdateMessage = 'serviceWorker.update.message',