mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
chainer for motors tab
This commit is contained in:
parent
80dfe85930
commit
eb208af39d
5 changed files with 42 additions and 17 deletions
|
@ -6,6 +6,16 @@ var MotorMixerRuleCollection = function () {
|
|||
var self = {};
|
||||
var data = [];
|
||||
|
||||
self.motorCount = 0;
|
||||
|
||||
self.setMotorCount = function (value) {
|
||||
self.motorCount = value;
|
||||
};
|
||||
|
||||
self.getMotorCount = function () {
|
||||
return self.motorCount;
|
||||
};
|
||||
|
||||
self.put = function (element) {
|
||||
data.push(element);
|
||||
};
|
||||
|
@ -42,7 +52,7 @@ var MotorMixerRuleCollection = function () {
|
|||
};
|
||||
|
||||
self.hasFreeSlots = function () {
|
||||
return data.length < 8;
|
||||
return data.length < self.getMotorCount();
|
||||
};
|
||||
|
||||
return self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue