mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-16 04:45:18 +03:00
Backend for getting logic conditions from FC
This commit is contained in:
parent
3c7cf5fc47
commit
d6ded2404e
8 changed files with 166 additions and 5 deletions
63
js/logicCondition.js
Normal file
63
js/logicCondition.js
Normal file
|
@ -0,0 +1,63 @@
|
|||
'use strict';
|
||||
|
||||
let LogicCondition = function (enabled, operation, operandAType, operandAValue, operandBType, operandBValue, flags) {
|
||||
let self = {};
|
||||
|
||||
self.getEnabled = function () {
|
||||
return !!enabled;
|
||||
};
|
||||
|
||||
self.setEnabled = function (data) {
|
||||
enabled = !!data;
|
||||
};
|
||||
|
||||
self.getOperation = function () {
|
||||
return operation;
|
||||
};
|
||||
|
||||
self.setOperation = function (data) {
|
||||
operation = data;
|
||||
};
|
||||
|
||||
self.getOperandAType = function () {
|
||||
return operandAType;
|
||||
};
|
||||
|
||||
self.setOperandAType = function (data) {
|
||||
operandAType = data;
|
||||
};
|
||||
|
||||
self.getOperandAValue = function () {
|
||||
return operandAValue;
|
||||
};
|
||||
|
||||
self.setOperandAValue = function (data) {
|
||||
operandAValue = data;
|
||||
};
|
||||
|
||||
self.getOperandBType = function () {
|
||||
return operandBType;
|
||||
};
|
||||
|
||||
self.setOperandBType = function (data) {
|
||||
operandBType = data;
|
||||
};
|
||||
|
||||
self.getOperandBValue = function () {
|
||||
return operandBValue;
|
||||
};
|
||||
|
||||
self.setOperandBValue = function (data) {
|
||||
operandBValue = data;
|
||||
};
|
||||
|
||||
self.getFlags = function () {
|
||||
return flags;
|
||||
};
|
||||
|
||||
self.setFlags = function (data) {
|
||||
flags = data;
|
||||
};
|
||||
|
||||
return self;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue