mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
tab tasks unified
This commit is contained in:
parent
d1fcb81017
commit
d1483e5e26
18 changed files with 46 additions and 99 deletions
27
js/tasks.js
Normal file
27
js/tasks.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
'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…
Add table
Add a link
Reference in a new issue