Merge pull request #1185 from iNavFlight/dzikuvx-config-tab-cleanup

Config tab cleanup & PIT Tuning changes
pull/1187/head
Paweł Spychalski 4 years ago committed by GitHub
commit 4d320a92c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3490,6 +3490,18 @@
"dTermMechanics": { "dTermMechanics": {
"message": "D-term mechanics" "message": "D-term mechanics"
}, },
"tpaMechanics": {
"message": "Thrust PID attenuation"
},
"fw_level_pitch_trim": {
"message": "Level Trim [deg]"
},
"fw_level_pitch_trim_help": {
"message": "Pitch trim for self-leveling flight modes. In degrees. +5 means airplane nose should be raised 5 deg from level"
},
"fwLevelTrimMechanics": {
"message": "Fixed Wing Level Trim"
},
"d_boost_factor": { "d_boost_factor": {
"message": "D-Boost Factor" "message": "D-Boost Factor"
}, },
@ -3615,5 +3627,8 @@
}, },
"configurationCurrentMeterType": { "configurationCurrentMeterType": {
"message": "Current Meter Type" "message": "Current Meter Type"
},
"rollPitchAdjustmentsMoved": {
"message": "Roll & Pitch board orientation is available only in the CLI. Do not use it to trim the airplane for the level flight! Use <strong>fw_level_pitch_trim</strong> instead"
} }
} }

@ -603,12 +603,8 @@ var FC = {
getLooptimes: function () { getLooptimes: function () {
return { return {
125: { 125: {
defaultLooptime: 1000, defaultLooptime: 500,
looptimes: { looptimes: {
4000: "250Hz",
3000: "334Hz",
2000: "500Hz",
1500: "667Hz",
1000: "1kHz", 1000: "1kHz",
500: "2kHz", 500: "2kHz",
250: "4kHz", 250: "4kHz",
@ -618,8 +614,6 @@ var FC = {
1000: { 1000: {
defaultLooptime: 1000, defaultLooptime: 1000,
looptimes: { looptimes: {
4000: "250Hz",
2000: "500Hz",
1000: "1kHz" 1000: "1kHz"
} }
} }
@ -630,10 +624,6 @@ var FC = {
125: { 125: {
defaultLooptime: 1000, defaultLooptime: 1000,
looptimes: { looptimes: {
4000: "250Hz",
3000: "334Hz",
2000: "500Hz",
1500: "667Hz",
1000: "1kHz", 1000: "1kHz",
500: "2kHz", 500: "2kHz",
250: "4kHz", 250: "4kHz",
@ -643,8 +633,6 @@ var FC = {
1000: { 1000: {
defaultLooptime: 1000, defaultLooptime: 1000,
looptimes: { looptimes: {
4000: "250Hz",
2000: "500Hz",
1000: "1kHz" 1000: "1kHz"
} }
} }
@ -654,32 +642,26 @@ var FC = {
return [ return [
{ {
tick: 125, tick: 125,
defaultDenominator: 16,
label: "256Hz" label: "256Hz"
}, },
{ {
tick: 1000, tick: 1000,
defaultDenominator: 2,
label: "188Hz" label: "188Hz"
}, },
{ {
tick: 1000, tick: 1000,
defaultDenominator: 2,
label: "98Hz" label: "98Hz"
}, },
{ {
tick: 1000, tick: 1000,
defaultDenominator: 2,
label: "42Hz" label: "42Hz"
}, },
{ {
tick: 1000, tick: 1000,
defaultDenominator: 2,
label: "20Hz" label: "20Hz"
}, },
{ {
tick: 1000, tick: 1000,
defaultDenominator: 2,
label: "10Hz" label: "10Hz"
} }
]; ];

@ -2107,7 +2107,7 @@ select {
} }
.info-box { .info-box {
background-color: darkgoldenrod; background-color: #37a8db;
color: white; color: white;
font-weight: bold; font-weight: bold;
margin: 0.4em 0; margin: 0.4em 0;

@ -12,7 +12,6 @@
<div class="spacer_box_title" data-i18n="configurationSystem"></div> <div class="spacer_box_title" data-i18n="configurationSystem"></div>
</div> </div>
<div class="spacer_box"> <div class="spacer_box">
<div id="gyrolpf-info" class="info-box is-hidden"></div>
<div class="select is-hidden"> <div class="select is-hidden">
<select id="gyro-lpf"></select> <select id="gyro-lpf"></select>
<label for="gyro-lpf"> <span data-i18n="configurationGyroLpfTitle"></span></label> <label for="gyro-lpf"> <span data-i18n="configurationGyroLpfTitle"></span></label>
@ -82,16 +81,7 @@
<div class="helpicon cf_tip" data-i18n_title="configHelp2"></div> <div class="helpicon cf_tip" data-i18n_title="configHelp2"></div>
</div> </div>
<div class="spacer_box"> <div class="spacer_box">
<div class="number"> <div class="info-box" data-i18n="rollPitchAdjustmentsMoved"></div>
<input type="number" id="board_align_roll" name="board_align_roll" step="0.1" min="-180" max="360" />
<div class="alignicon roll"></div>
<label for="board_align_roll" data-i18n="configurationBoardAlignmentRoll"></label>
</div>
<div class="number">
<input type="number" id="board_align_pitch" name="board_align_pitch" step="0.1" min="-180" max="360" />
<div class="alignicon pitch"></div>
<label for="board_align_pitch" data-i18n="configurationBoardAlignmentPitch"></label>
</div>
<div class="number"> <div class="number">
<input id="board_align_yaw" type="number" name="board_align_yaw" step="0.1" min="-180" max="360" /> <input id="board_align_yaw" type="number" name="board_align_yaw" step="0.1" min="-180" max="360" />
<div class="alignicon yaw"></div> <div class="alignicon yaw"></div>

@ -257,8 +257,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('#content').scrollTop((scrollPosition) ? scrollPosition : 0); $('#content').scrollTop((scrollPosition) ? scrollPosition : 0);
// fill board alignment // fill board alignment
$('input[name="board_align_roll"]').val((BF_CONFIG.board_align_roll / 10.0).toFixed(1));
$('input[name="board_align_pitch"]').val((BF_CONFIG.board_align_pitch / 10.0).toFixed(1));
$('input[name="board_align_yaw"]').val((BF_CONFIG.board_align_yaw / 10.0).toFixed(1)); $('input[name="board_align_yaw"]').val((BF_CONFIG.board_align_yaw / 10.0).toFixed(1));
// fill magnetometer // fill magnetometer
@ -316,12 +314,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$i2cSpeed.change(); $i2cSpeed.change();
var $looptime = $("#looptime"); let $looptime = $("#looptime"),
$gyroLpf = $("#gyro-lpf"),
var $gyroLpf = $("#gyro-lpf"), values = FC.getGyroLpfValues();
$gyroLpfMessage = $('#gyrolpf-info');
var values = FC.getGyroLpfValues();
for (i in values) { for (i in values) {
if (values.hasOwnProperty(i)) { if (values.hasOwnProperty(i)) {
@ -343,43 +338,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
); );
$looptime.val(FC.getLooptimes()[FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick].defaultLooptime); $looptime.val(FC.getLooptimes()[FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick].defaultLooptime);
$looptime.change(); $looptime.change();
$gyroLpfMessage.hide();
$gyroLpfMessage.removeClass('ok-box');
$gyroLpfMessage.removeClass('info-box');
$gyroLpfMessage.removeClass('warning-box');
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
switch (parseInt(INAV_PID_CONFIG.gyroscopeLpf, 10)) {
case 0:
$gyroLpfMessage.html(chrome.i18n.getMessage('gyroLpfSuggestedMessage'));
$gyroLpfMessage.addClass('ok-box');
$gyroLpfMessage.show();
break;
case 1:
$gyroLpfMessage.html(chrome.i18n.getMessage('gyroLpfWhyNotHigherMessage'));
$gyroLpfMessage.addClass('info-box');
$gyroLpfMessage.show();
break;
case 2:
$gyroLpfMessage.html(chrome.i18n.getMessage('gyroLpfWhyNotSlightlyHigherMessage'));
$gyroLpfMessage.addClass('info-box');
$gyroLpfMessage.show();
break
case 3:
$gyroLpfMessage.html(chrome.i18n.getMessage('gyroLpfNotAdvisedMessage'));
$gyroLpfMessage.addClass('info-box');
$gyroLpfMessage.show();
break;
case 4:
case 5:
$gyroLpfMessage.html(chrome.i18n.getMessage('gyroLpfNotFlyableMessage'));
$gyroLpfMessage.addClass('warning-box');
$gyroLpfMessage.show();
break;
}
}
}); });
$gyroLpf.change(); $gyroLpf.change();
@ -393,11 +351,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} else { } else {
$('#looptime-warning').hide(); $('#looptime-warning').hide();
} }
if (INAV_PID_CONFIG.asynchronousMode == 0) {
//All task running together
ADVANCED_CONFIG.gyroSyncDenominator = Math.floor(FC_CONFIG.loopTime / FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick);
}
}); });
$looptime.change(); $looptime.change();
@ -512,8 +465,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
helper.features.reset(); helper.features.reset();
helper.features.fromUI($('.tab-configuration')); helper.features.fromUI($('.tab-configuration'));
helper.features.execute(function () { helper.features.execute(function () {
BF_CONFIG.board_align_roll = Math.round(parseFloat($('input[name="board_align_roll"]').val()) * 10);
BF_CONFIG.board_align_pitch = Math.round(parseFloat($('input[name="board_align_pitch"]').val()) * 10);
BF_CONFIG.board_align_yaw = Math.round(parseFloat($('input[name="board_align_yaw"]').val()) * 10); BF_CONFIG.board_align_yaw = Math.round(parseFloat($('input[name="board_align_yaw"]').val()) * 10);
BF_CONFIG.currentscale = parseInt($('#currentscale').val()); BF_CONFIG.currentscale = parseInt($('#currentscale').val());
BF_CONFIG.currentoffset = Math.round(parseFloat($('#currentoffset').val()) * 10); BF_CONFIG.currentoffset = Math.round(parseFloat($('#currentoffset').val()) * 10);

@ -164,27 +164,6 @@
</table> </table>
</div> </div>
</div> </div>
<div class="clear-both"></div>
<div class="cf_column" style="margin-top:1em;">
<table class="settings-table settings-table--misc">
<tr>
<th data-i18n="pidTuningTPA"></th>
<td>
<input type="number" class="rate-tpa_input" id="tpa" step="1" min="0" max="100" />
%
<div class="helpicon cf_tip" data-i18n_title="pidTuningTPAHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="pidTuningTPABreakPoint"></th>
<td>
<input type="number" class="rate-tpa_input" id="tpa-breakpoint" step="10" min="1000"
max="2000" />
<div class="helpicon cf_tip" data-i18n_title="pidTuningTPABreakPointHelp"></div>
</td>
</tr>
</table>
</div>
</div> </div>
<div id="subtab-rates" class="subtab__content"> <div id="subtab-rates" class="subtab__content">
@ -566,6 +545,44 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="clear-both"></div>
<div class="tab_subtitle" data-i18n="tpaMechanics" style="margin-top: 1em;"></div>
<div class="cf_column" style="margin-top:1em;">
<table class="settings-table settings-table--misc">
<tr>
<th data-i18n="pidTuningTPA"></th>
<td>
<input type="number" class="rate-tpa_input" id="tpa" step="1" min="0" max="100" />
%
<div class="helpicon cf_tip" data-i18n_title="pidTuningTPAHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="pidTuningTPABreakPoint"></th>
<td>
<input type="number" class="rate-tpa_input" id="tpa-breakpoint" step="10" min="1000"
max="2000" />
<div class="helpicon cf_tip" data-i18n_title="pidTuningTPABreakPointHelp"></div>
</td>
</tr>
</table>
</div>
<div class="clear-both"></div>
<div class="tab_subtitle" data-i18n="fwLevelTrimMechanics" style="margin-top: 1em;"></div>
<div class="cf_column">
<table class="settings-table settings-table--filtering">
<tbody>
<tr>
<th data-i18n="fw_level_pitch_trim"></th>
<td>
<input data-setting="fw_level_pitch_trim" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="fw_level_pitch_trim_help"></div>
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> </div>
<div class="clear-both"></div> <div class="clear-both"></div>

Loading…
Cancel
Save