Merge pull request #100 from TheAngularity/master

Fixed Model Preview on PID Tuning and Receiver Tab
10.3.x-maintenance
Michael Keller 2016-07-12 07:32:48 +12:00 committed by GitHub
commit 6fb5603107
4 changed files with 15 additions and 18 deletions

View File

@ -589,8 +589,7 @@
.tab-pid_tuning .rates_preview_cell { .tab-pid_tuning .rates_preview_cell {
position: relative; position: relative;
width: 100%; width: 100%;
height: 0; height: 320px;
padding-bottom: 100%;
} }
.tab-pid_tuning .rates_preview { .tab-pid_tuning .rates_preview {
@ -606,5 +605,4 @@
margin-top: -1px; margin-top: -1px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
height: 260px;
} }

View File

@ -203,17 +203,16 @@
</div> </div>
</th> </th>
</tr> </tr>
<tr class="HORIZON">
<!-- 7 -->
<td class="third" i18n="pidTuningHorizon"></td>
<td class="third"><input type="number" name="p" step="1" min="0" max="255" /></td>
<td class="third"><input type="number" name="i" step="1" min="0" max="255" /></td>
</tr>
<tr class="ANGLE"> <tr class="ANGLE">
<!-- 7 --> <!-- 7 -->
<td class="third" i18n="pidTuningAngle"></td> <td class="third" i18n="pidTuningAngle"></td>
<td class="third"><input type="number" name="p" step="1" min="0" max="255" /></td>
</tr>
<tr class="HORIZON">
<!-- 7 -->
<td class="third" i18n="pidTuningHorizon"></td>
<td class="third"><input type="number" name="i" step="1" min="0" max="255" /></td>
<td class="third"><input type="number" name="d" step="1" min="0" max="255" /></td> <td class="third"><input type="number" name="d" step="1" min="0" max="255" /></td>
<td></td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@ -145,18 +145,18 @@ TABS.pid_tuning.initialize = function (callback) {
}); });
i = 0; i = 0;
$('.pid_tuning .HORIZON input').each(function () { $('.pid_tuning .ANGLE input').each(function () {
switch (i) { switch (i) {
case 0: case 0:
$(this).val(PIDs[7][i++]); $(this).val(PIDs[7][i++]);
break; break;
}
});
$('.pid_tuning .HORIZON input').each(function () {
switch (i) {
case 1: case 1:
$(this).val(PIDs[7][i++]); $(this).val(PIDs[7][i++]);
break; break;
}
});
$('.pid_tuning .ANGLE input').each(function () {
switch (i) {
case 2: case 2:
$(this).val(PIDs[7][i++]); $(this).val(PIDs[7][i++]);
break; break;
@ -267,10 +267,10 @@ TABS.pid_tuning.initialize = function (callback) {
}); });
i = 0; i = 0;
$('table.pid_tuning tr.HORIZON input').each(function () { $('table.pid_tuning tr.ANGLE input').each(function () {
PIDs[7][i++] = parseFloat($(this).val()); PIDs[7][i++] = parseFloat($(this).val());
}); });
$('table.pid_tuning tr.ANGLE input').each(function () { $('table.pid_tuning tr.HORIZON input').each(function () {
PIDs[7][i++] = parseFloat($(this).val()); PIDs[7][i++] = parseFloat($(this).val());
}); });

View File

@ -436,7 +436,7 @@
.tab-receiver .model_preview_cell { .tab-receiver .model_preview_cell {
position: relative; position: relative;
width: 100%; width: 100%;
height: 220px; height: 180px;
} }
.tab-receiver .model_preview { .tab-receiver .model_preview {