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) 782a7d0a99 lower periodic tasks frequency
2019-02-11 10:36:44 +01:00

25 lines
No EOL
637 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 () {
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
});
}, privateScope.getStatusPullInterval(), true);
};
return publicScope;
})();