recovery bugfix

10.3.x-maintenance
cTn 2014-08-10 06:01:21 +02:00 committed by Dominic Clifton
parent 696e27b503
commit 1e0cadc039
1 changed files with 4 additions and 6 deletions

View File

@ -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