Add new logic conditions and poll on Programming Tab

pull/954/head
Pawel Spychalski (DzikuVx) 5 years ago
parent 6fce522961
commit 1f92a1383a

@ -1066,6 +1066,34 @@ var FC = {
13: { 13: {
name: "STICKY", name: "STICKY",
hasOperand: [true, true] hasOperand: [true, true]
},
14: {
name: "ADD",
hasOperand: [true, true]
},
15: {
name: "SUB",
hasOperand: [true, true]
},
16: {
name: "MUL",
hasOperand: [true, true]
},
17: {
name: "DIV",
hasOperand: [true, true]
},
18: {
name: "GVAR SET",
hasOperand: [true, true]
},
19: {
name: "GVAR INC",
hasOperand: [true, true]
},
20: {
name: "GVAR DEC",
hasOperand: [true, true]
} }
} }
}, },
@ -1176,6 +1204,12 @@ var FC = {
range: [0, 15], range: [0, 15],
default: 0 default: 0
}, },
5: {
name: "Global Variable",
type: "range",
range: [0, 3],
default: 0
}
} }
} }
}; };

@ -44,8 +44,20 @@ TABS.programming.initialize = function (callback, scrollPosition) {
saveChainer.execute(); saveChainer.execute();
}); });
if (semver.gte(CONFIG.flightControllerVersion, "2.3.0")) {
helper.mspBalancedInterval.add('logic_conditions_pull', 350, 1, getLogicConditionsStatus);
}
GUI.content_ready(callback); GUI.content_ready(callback);
} }
function getLogicConditionsStatus() {
mspHelper.loadSensorStatus(onStatusPullDone);
}
function onStatusPullDone() {
LOGIC_CONDITIONS.update(LOGIC_CONDITIONS_STATUS);
}
} }
TABS.programming.cleanup = function (callback) { TABS.programming.cleanup = function (callback) {

Loading…
Cancel
Save