diff --git a/locales/en/messages.json b/locales/en/messages.json index 832d04c7..84e0b32f 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -306,6 +306,13 @@ "message": "Show Log" }, + "serialErrorFrameError": { + "message": "Serial connection error: bad framing" + }, + "serialErrorParityError": { + "message": "Serial connection error: bad parity" + }, + "serialPortOpened": { "message": "Serial port successfully opened with ID: $1" }, diff --git a/src/js/serial.js b/src/js/serial.js index d4276182..6cd8bc9a 100644 --- a/src/js/serial.js +++ b/src/js/serial.js @@ -114,11 +114,12 @@ var serial = { // We will do nothing. break; + case 'frame_error': + case 'parity_error': + GUI.log(i18n.getMessage('serialError' + inflection.camelize(info.error))); case 'break': // This seems to be the error that is thrown under NW.js in Windows when the device reboots after typing 'exit' in CLI case 'disconnected': case 'device_lost': - case 'frame_error': - case 'parity_error': default: console.log("serial disconnecting: " + info.error); CONFIG.armingDisabled = false;