mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 06:15:13 +03:00
log certain errors to the GUI's log to help with noticing hardware issues
This commit is contained in:
parent
083f3e31b0
commit
85b48b7ac4
2 changed files with 10 additions and 2 deletions
|
@ -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 <span class=\"message-positive\">successfully</span> opened with ID: $1"
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue