recovery bugfix
parent
696e27b503
commit
1e0cadc039
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…
Reference in New Issue