Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tasks.js « js - github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a53d0ba6535309674648386be527cd19e0d4c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'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;
})();