Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tabs
diff options
context:
space:
mode:
authorPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2019-04-04 18:28:26 +0300
committerPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2019-04-04 18:28:26 +0300
commit564d1cdca5cb4c021f079767a6c88822eab621ba (patch)
treef7b08c1d296bf361d7605406ccd74030b17946d9 /tabs
parent57f7035ef0f67c416c371ad45731d389e23144ad (diff)
Store logic condition with smix rule
Diffstat (limited to 'tabs')
-rw-r--r--tabs/mixer.html1
-rw-r--r--tabs/mixer.js10
2 files changed, 11 insertions, 0 deletions
diff --git a/tabs/mixer.html b/tabs/mixer.html
index f0816762..e87766c0 100644
--- a/tabs/mixer.html
+++ b/tabs/mixer.html
@@ -111,6 +111,7 @@
<th data-i18n="input"></th>
<th data-i18n="weight"></th>
<th data-i18n="speed"></th>
+ <th data-i18n="active"></th>
<th class="delete"></th>
</tr>
</thead>
diff --git a/tabs/mixer.js b/tabs/mixer.js
index e7188059..e17f1c02 100644
--- a/tabs/mixer.js
+++ b/tabs/mixer.js
@@ -124,11 +124,21 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
<td><select class="mix-rule-input"></select></td>\
<td><input type="number" class="mix-rule-rate" step="1" min="-125" max="125" /></td>\
<td><input type="number" class="mix-rule-speed" step="1" min="0" max="255" /></td>\
+ <td><select class="mix-rule-condition"></td>\
<td><span class="btn default_btn narrow red"><a href="#" data-role="role-servo-delete" data-i18n="servoMixerDelete"></a></span></td>\
</tr>\
');
const $row = $servoMixTableBody.find('tr:last');
+ const $conditions = $row.find('.mix-rule-condition');
+
+ $conditions.append('<option value="-1">Always</option>')
+ for (let i = 0; i < 16 ; i++) {
+ $conditions.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
+ }
+ $conditions.val(servoRule.getConditionId()).change(function () {
+ servoRule.setConditionId($(this).val());
+ });
GUI.fillSelect($row.find(".mix-rule-input"), FC.getServoMixInputNames(), servoRule.getInput());