mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 00:35:20 +03:00
retry on timeout mechanism
This commit is contained in:
parent
ba165a0f14
commit
9594880041
3 changed files with 31 additions and 2 deletions
|
@ -40,7 +40,18 @@ helper.mspQueue = (function (serial, MSP) {
|
|||
*/
|
||||
privateScope.portInUse = true;
|
||||
|
||||
//TODO implement timeout scenario
|
||||
request.timer = setTimeout(function () {
|
||||
console.log('MSP data request timed-out: ' + request.code);
|
||||
/*
|
||||
* Remove current callback
|
||||
*/
|
||||
MSP.removeCallback(request.code);
|
||||
|
||||
/*
|
||||
* Create new entry in the queue
|
||||
*/
|
||||
publicScope.put(request);
|
||||
}, serial.getTimeout());
|
||||
|
||||
/*
|
||||
* Set receive callback here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue