1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 19:40:22 +03:00
inav-configurator/js/tasks.js
Pawel Spychalski (DzikuVx) d1483e5e26 tab tasks unified
2017-01-18 16:50:35 +01:00

27 lines
No EOL
734 B
JavaScript

'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;
})();