1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-12 19:10:21 +03:00
inav-configurator/js/servoMixRule.js
2024-04-18 15:39:19 -03:00

54 lines
937 B
JavaScript

'use strict';
var ServoMixRule = function (target, input, rate, speed, condition) {
var self = {};
self.getTarget = function () {
return target;
};
self.setTarget = function (data) {
target = data;
};
self.getInput = function () {
return input;
};
self.setInput = function (data) {
input = data;
};
self.getRate = function () {
return rate;
};
self.setRate = function (data) {
rate = data;
};
self.getSpeed = function () {
return speed;
};
self.setSpeed = function (data) {
speed = data;
};
self.isUsed = function () {
return rate !== 0;
};
self.getConditionId = function () {
return (condition == undefined) ? -1 : condition;
};
self.setConditionId = function (data) {
condition = data;
};
return self;
};
module.exports = ServoMixRule;