mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
recovery bugfix
This commit is contained in:
parent
42e25fbb02
commit
377853b58a
1 changed files with 4 additions and 6 deletions
10
js/serial.js
10
js/serial.js
|
@ -29,12 +29,6 @@ var serial = {
|
|||
|
||||
switch (info.error) {
|
||||
case 'system_error': // we might be able to recover from this one
|
||||
chrome.serial.setPaused(self.connectionId, false, get_status);
|
||||
|
||||
var get_status = function () {
|
||||
self.getInfo(crunch_status);
|
||||
}
|
||||
|
||||
var crunch_status = function (info) {
|
||||
if (!info.paused) {
|
||||
console.log('SERIAL: Connection recovered from last onReceiveError');
|
||||
|
@ -51,6 +45,10 @@ var serial = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
chrome.serial.setPaused(self.connectionId, false, function () {
|
||||
self.getInfo(crunch_status);
|
||||
});
|
||||
break;
|
||||
case 'timeout':
|
||||
// TODO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue