1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-17 13:25:22 +03:00

Merge pull request #806 from iNavFlight/dzikuvx-16-servos

Support for 16 servos
This commit is contained in:
Paweł Spychalski 2019-07-16 19:54:16 +02:00 committed by GitHub
commit c20fff75b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 38 deletions

View file

@ -102,7 +102,7 @@
"message": "GPS"
},
"tabMotorTesting": {
"message": "Motors"
"message": "Outputs"
},
"tabLedStrip": {
"message": "LED Strip"

View file

@ -211,7 +211,7 @@ var FC = {
};
MOTOR_DATA = new Array(8);
SERVO_DATA = new Array(8);
SERVO_DATA = new Array(16);
GPS_DATA = {
fix: 0,

View file

@ -5,7 +5,7 @@ let ServoMixerRuleCollection = function () {
let self = {},
data = [],
maxServoCount = 8;
maxServoCount = 16;
self.setServoCount = function (value) {
maxServoCount = value;

View file

@ -174,9 +174,7 @@
}
.tab-motors .motorblock {
margin-bottom: 0px;
background-color: #ECECEC;
/*background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.15));*/
}
.tab-motors .left.motors {
@ -184,11 +182,6 @@
width: calc(50% - 50px);
}
.tab-motors .right.servos {
float: right;
width: 50%;
}
.tab-motors .title {
padding-bottom: 2px;
text-align: center;
@ -199,7 +192,8 @@
padding-bottom: 2px;
text-align: center;
font-size: 12px;
font-family: 'open_sanslight', Arial;
font-weight: bold;
margin-bottom: 1em;
}
.tab-motors .titles {
@ -215,7 +209,7 @@
.tab-motors .servos .titles li {
float: right;
width: calc((100% / 8) - 10px);
width: calc((100% / 16) - 10px);
margin: 0 0 0 10px;
}
@ -266,7 +260,7 @@
.tab-motors .servos .m-block {
float: right;
width: calc((100% / 8) - 10px);
width: calc((100% / 16) - 10px);
margin: 0 0 0 10px;
border-radius: 3px;
}
@ -310,7 +304,7 @@
text-align: center;
}
.tab-motors .motor_testing .notice {
.tab-motors .motor_testing_notice {
float: right;
width: calc(50% - 24px);
padding: 5px;
@ -320,10 +314,10 @@
font-size: 11px;
}
.tab-motors .motor_testing .notice p {
.tab-motors .motor_testing_notice p {
margin-bottom: 10px;
}
.tab-motors .motor_testing .notice .motorsEnableTestMode {
.tab-motors .motor_testing_notice .motorsEnableTestMode {
margin-left: 10px;
}

View file

@ -120,7 +120,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
$servoMixTableBody.append('\
<tr>\
<td><input type="number" class="mix-rule-servo" step="1" min="0" max="7" /></td>\
<td><input type="number" class="mix-rule-servo" step="1" min="0" max="15" /></td>\
<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>\

View file

@ -62,25 +62,17 @@
</div>
<div class="gui_box motorblock">
<div class="spacer">
<div class="title2">Motors</div>
<div class="left motors">
<div class="title2">Motors</div>
<ul class="titles motor-titles">
</ul>
<div class="bar-wrapper"></div>
</div>
<div class="right servos">
<div class="title2">Servos</div>
<ul class="titles">
<li title="Servo - 8">8</li>
<li title="Servo - 7">7</li>
<li title="Servo - 6">6</li>
<li title="Servo - 5">5</li>
<li title="Servo - 4">4</li>
<li title="Servo - 3">3</li>
<li title="Servo - 2">2</li>
<li title="Servo - 1">1</li>
</ul>
<div class="bar-wrapper"></div>
<div class="motor_testing_notice">
<p i18n="motorsNotice"></p>
<label><input id="motorsEnableTestMode" type="checkbox" class="togglesmall"/><span
class="motorsEnableTestMode" i18n="motorsEnableControl"></span></label>
</div>
<div class="clear-both"></div>
<div class="motor_testing">
@ -94,14 +86,35 @@
</ul>
</div>
</div>
<div class="notice">
<p i18n="motorsNotice"></p>
<label><input id="motorsEnableTestMode" type="checkbox" class="togglesmall"/><span
class="motorsEnableTestMode" i18n="motorsEnableControl"></span></label>
</div>
<div class="cler-both"></div>
</div>
</div>
</div>
<div class="gui_box motorblock">
<div class="spacer" style="padding-left: 0">
<div class="title2">Servos</div>
<div class="servos">
<ul class="titles">
<li title="Servo - 8">15</li>
<li title="Servo - 7">14</li>
<li title="Servo - 6">13</li>
<li title="Servo - 5">12</li>
<li title="Servo - 4">11</li>
<li title="Servo - 3">10</li>
<li title="Servo - 2">9</li>
<li title="Servo - 1">8</li>
<li title="Servo - 8">7</li>
<li title="Servo - 7">6</li>
<li title="Servo - 6">5</li>
<li title="Servo - 5">4</li>
<li title="Servo - 4">3</li>
<li title="Servo - 3">2</li>
<li title="Servo - 2">1</li>
<li title="Servo - 1">0</li>
</ul>
<div class="bar-wrapper"></div>
</div>
</div>
</div>
</div>
</div>

View file

@ -340,8 +340,14 @@ TABS.motors.initialize = function (callback) {
$motorValues.append('<li style="font-weight: bold" data-i18n="motorsMaster"></li>');
for (let i = 0; i < SERVO_RULES.getServoCount(); i++) {
let opacity = "";
if (!SERVO_RULES.isServoConfigured(15 - i)) {
opacity = ' style="opacity: 0.2"';
}
servos_wrapper.append('\
<div class="m-block servo-' + (7 - i) + '">\
<div class="m-block servo-' + (15 - i) + '" ' + opacity + '>\
<div class="meter-bar">\
<div class="label"></div>\
<div class="indicator">\

View file

@ -182,7 +182,7 @@ TABS.servos.initialize = function (callback) {
let usedServoIndex = 0;
for (let servoIndex = 0; servoIndex < 8; servoIndex++) {
for (let servoIndex = 0; servoIndex < SERVO_RULES.getServoCount(); servoIndex++) {
process_servos('Servo ' + servoIndex, '', servoIndex);
}
if (usedServoIndex == 0) {