Merge pull request #685 from iNavFlight/dzikuvx-msp-heavy

MSP queue adjustments
pull/690/head
Paweł Spychalski 6 years ago committed by GitHub
commit f139a6a155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,7 +95,6 @@ sources.js = [
'./js/protocols/stm32usbdfu.js',
'./js/localization.js',
'./js/boards.js',
'./js/tasks.js',
'./js/servoMixerRuleCollection.js',
'./js/motorMixerRuleCollection.js',
'./js/vtx.js',

@ -19,15 +19,11 @@ helper.periodicStatusUpdater = (function () {
}
if (baudSpeed >= 115200) {
return 200;
return 300;
} else if (baudSpeed >= 57600) {
return 400;
} else if (baudSpeed >= 38400) {
return 500;
} else if (baudSpeed >= 19200) {
return 600;
} else if (baudSpeed >= 9600) {
return 750;
} else if (baudSpeed >= 38400) {
return 800;
} else {
return 1000;
}

@ -300,9 +300,9 @@ var serial = {
*/
getTimeout: function () {
if (serial.bitrate >= 57600) {
return 1500;
return 3000;
} else {
return 2500;
return 4000;
}
}

@ -1,27 +0,0 @@
'use strict';
var helper = helper || {};
helper.task = (function () {
var publicScope = {},
privateScope = {};
privateScope.getStatusPullInterval = function () {
//TODO use serial connection speed to determine update interval
return 250;
};
publicScope.statusPullStart = function () {
helper.interval.add('status_pull', function () {
MSP.send_message(MSPCodes.MSP_STATUS, false, false, function () {
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
}
});
}, privateScope.getStatusPullInterval(), true);
};
return publicScope;
})();
Loading…
Cancel
Save