1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 04:15:28 +03:00

MSP layer for global functions

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-04-05 18:09:15 +02:00
parent 7f4ec9a559
commit 554bec3606
6 changed files with 154 additions and 0 deletions

57
js/globalFunction.js Normal file
View file

@ -0,0 +1,57 @@
/*global $,FC*/
'use strict';
let GlobalFunction = function (enabled, conditionId, action, operandType, operandValue, flags) {
let self = {};
let $row;
self.getEnabled = function () {
return !!enabled;
}
self.setEnabled = function (data) {
enabled = !!data;
}
self.getConditionId = function () {
return conditionId;
}
self.setConditionId = function (data) {
conditionId = data;
}
self.getAction = function () {
return action;
}
self.setAction = function (data) {
action = data;
}
self.getOperandType = function () {
return operandType;
}
self.setOperandType = function (data) {
operandType = data;
}
self.getOperandValue = function () {
return operandValue;
}
self.setOperandValue = function (data) {
operandValue = data;
}
self.getFlags = function () {
return flags;
};
self.setFlags = function (data) {
flags = data;
};
return self;
}