1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

BLE, TCP and UDP Support

This commit is contained in:
Andi Kanzler 2022-03-31 16:18:46 +02:00
parent 1322fd69bd
commit ab7162980b
24 changed files with 1190 additions and 387 deletions

View file

@ -2,7 +2,7 @@
var helper = helper || {};
helper.mspQueue = (function (serial, MSP) {
helper.mspQueue = (function (MSP) {
var publicScope = {},
privateScope = {};
@ -101,7 +101,7 @@ helper.mspQueue = (function (serial, MSP) {
if (code == MSPCodes.MSP_SET_REBOOT || code == MSPCodes.MSP_EEPROM_WRITE) {
return 5000;
} else {
return serial.getTimeout();
return CONFIGURATOR.connection.getTimeout();
}
};
@ -128,7 +128,7 @@ helper.mspQueue = (function (serial, MSP) {
/*
* if port is blocked or there is no connection, do not process the queue
*/
if (publicScope.isLocked() || serial.connectionId === false) {
if (publicScope.isLocked() || CONFIGURATOR.connection === false) {
helper.eventFrequencyAnalyzer.put("port in use");
return false;
}
@ -178,7 +178,7 @@ helper.mspQueue = (function (serial, MSP) {
/*
* Send data to serial port
*/
serial.send(request.messageBody, function (sendInfo) {
CONFIGURATOR.connection.send(request.messageBody, function (sendInfo) {
if (sendInfo.bytesSent == request.messageBody.byteLength) {
/*
* message has been sent, check callbacks and free resource
@ -305,4 +305,4 @@ helper.mspQueue = (function (serial, MSP) {
setInterval(publicScope.balancer, Math.round(1000 / privateScope.balancerFrequency));
return publicScope;
})(serial, MSP);
})(MSP);