Unverified Commit 1336cc2b authored by Darren Lines's avatar Darren Lines Committed by GitHub
Browse files

Merge pull request #15 from iNavFlight/master

Merge from master
parents 01b1f550 2f733c00
......@@ -1284,138 +1284,150 @@
"message": "Pitch & Roll I Adjustment"
},
"adjustmentsFunction8": {
"message": "Pitch & Roll D/FF Adjustment"
"message": "Pitch & Roll D"
},
"adjustmentsFunction9": {
"message": "Yaw P Adjustment"
"message": "Pitch & Roll CD/FF Adjustment"
},
"adjustmentsFunction10": {
"message": "Yaw I Adjustment"
"message": "Pitch P Adjustment"
},
"adjustmentsFunction11": {
"message": "Yaw D/FF Adjustment"
"message": "Pitch I Adjustment"
},
"adjustmentsFunction12": {
"message": "Rate Profile Selection"
"message": "Pitch D Adjustment"
},
"adjustmentsFunction13": {
"message": "Pitch Rate"
"message": "Pitch CD/FF Adjustment"
},
"adjustmentsFunction14": {
"message": "Roll Rate"
"message": "Roll P Adjustment"
},
"adjustmentsFunction15": {
"message": "Pitch P Adjustment"
"message": "Roll I Adjustment"
},
"adjustmentsFunction16": {
"message": "Pitch I Adjustment"
"message": "Roll D Adjustment"
},
"adjustmentsFunction17": {
"message": "Pitch D/FF Adjustment"
"message": "Roll CD/FF Adjustment"
},
"adjustmentsFunction18": {
"message": "Roll P Adjustment"
"message": "Yaw P Adjustment"
},
"adjustmentsFunction19": {
"message": "Roll I Adjustment"
"message": "Yaw I Adjustment"
},
"adjustmentsFunction20": {
"message": "Roll D/FF Adjustment"
"message": "Yaw D Adjustment"
},
"adjustmentsFunction21": {
"message": "RC Yaw Expo Adjustment"
"message": "Yaw CD/FF Adjustment"
},
"adjustmentsFunction22": {
"message": "Manual RC Expo Adjustment"
"message": "Rate Profile Selection"
},
"adjustmentsFunction23": {
"message": "Manual RC Yaw Expo Adjustment"
"message": "Pitch Rate"
},
"adjustmentsFunction24": {
"message": "Manual Pitch & Roll Rate Adjustment"
"message": "Roll Rate"
},
"adjustmentsFunction25": {
"message": "Manual Roll Rate Adjustment"
"message": "RC Yaw Expo Adjustment"
},
"adjustmentsFunction26": {
"message": "Manual Pitch Rate Adjustment"
"message": "Manual RC Expo Adjustment"
},
"adjustmentsFunction27": {
"message": "Manual Yaw Rate Adjustment"
"message": "Manual RC Yaw Expo Adjustment"
},
"adjustmentsFunction28": {
"message": "Navigation FW Cruise Throttle Adjustment"
"message": "Manual Pitch & Roll Rate Adjustment"
},
"adjustmentsFunction29": {
"message": "Navigation FW Pitch To Throttle Adjustment"
"message": "Manual Roll Rate Adjustment"
},
"adjustmentsFunction30": {
"message": "Board Roll Alignment Adjustment"
"message": "Manual Pitch Rate Adjustment"
},
"adjustmentsFunction31": {
"message": "Board Pitch Alignment Adjustment"
"message": "Manual Yaw Rate Adjustment"
},
"adjustmentsFunction32": {
"message": "Level P Adjustment"
"message": "Navigation FW Cruise Throttle Adjustment"
},
"adjustmentsFunction33": {
"message": "Level I Adjustment"
"message": "Navigation FW Pitch To Throttle Adjustment"
},
"adjustmentsFunction34": {
"message": "Level D Adjustment"
"message": "Board Roll Alignment Adjustment"
},
"adjustmentsFunction35": {
"message": "Pos XY P Adjustment"
"message": "Board Pitch Alignment Adjustment"
},
"adjustmentsFunction36": {
"message": "Pos XY I Adjustment"
"message": "Level P Adjustment"
},
"adjustmentsFunction37": {
"message": "Pos XY D Adjustment"
"message": "Level I Adjustment"
},
"adjustmentsFunction38": {
"message": "Pos Z P Adjustment"
"message": "Level D Adjustment"
},
"adjustmentsFunction39": {
"message": "Pos Z I Adjustment"
"message": "Pos XY P Adjustment"
},
"adjustmentsFunction40": {
"message": "Pos Z D Adjustment"
"message": "Pos XY I Adjustment"
},
"adjustmentsFunction41": {
"message": "Heading P Adjustment"
"message": "Pos XY D Adjustment"
},
"adjustmentsFunction42": {
"message": "Vel XY P Adjustment"
"message": "Pos Z P Adjustment"
},
"adjustmentsFunction43": {
"message": "Vel XY I Adjustment"
"message": "Pos Z I Adjustment"
},
"adjustmentsFunction44": {
"message": "Vel XY D Adjustment"
"message": "Pos Z D Adjustment"
},
"adjustmentsFunction45": {
"message": "Vel Z P Adjustment"
"message": "Heading P Adjustment"
},
"adjustmentsFunction46": {
"message": "Vel Z I Adjustment"
"message": "Vel XY P Adjustment"
},
"adjustmentsFunction47": {
"message": "Vel Z D Adjustment"
"message": "Vel XY I Adjustment"
},
"adjustmentsFunction48": {
"message": "FW min thr down pitch angle Adjustment"
"message": "Vel XY D Adjustment"
},
"adjustmentsFunction49": {
"message": "VTX power level Adjustment"
"message": "Vel Z P Adjustment"
},
"adjustmentsFunction50": {
"message": "Thrust PID Attenuation (TPA) Adjustment"
"message": "Vel Z I Adjustment"
},
"adjustmentsFunction51": {
"message": "TPA Breakpoint Adjustment"
"message": "Vel Z D Adjustment"
},
"adjustmentsFunction52": {
"message": "FW min thr down pitch angle Adjustment"
},
"adjustmentsFunction53": {
"message": "VTX power level Adjustment"
},
"adjustmentsFunction54": {
"message": "Thrust PID Attenuation (TPA) Adjustment"
},
"adjustmentsFunction55": {
"message": "TPA Breakpoint Adjustment"
},
"adjustmentsFunction56": {
"message": "Control Smoothness Adjustment"
},
"adjustmentsSave": {
......@@ -2455,8 +2467,8 @@
"w_z_baro_p_help": {
"message": "When this value is set to <strong>0</strong>, barometer is not used for altitude computation"
},
"w_z_gos_p_help": {
"message": "When this value is set to <strong>0</strong>, GPS is not used for altitude computation"
"w_z_gps_p_help": {
"message": "This setting is only used when no barometer is installed and <strong>inav_use_gps_no_baro</strong> is configured."
},
"wirelessModeSwitch": {
"message": "Wireless mode"
......@@ -3490,6 +3502,18 @@
"dTermMechanics": {
"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": {
"message": "D-Boost Factor"
},
......@@ -3615,5 +3639,8 @@
},
"configurationCurrentMeterType": {
"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 () {
return {
125: {
defaultLooptime: 1000,
defaultLooptime: 500,
looptimes: {
4000: "250Hz",
3000: "334Hz",
2000: "500Hz",
1500: "667Hz",
1000: "1kHz",
500: "2kHz",
250: "4kHz",
......@@ -618,8 +614,6 @@ var FC = {
1000: {
defaultLooptime: 1000,
looptimes: {
4000: "250Hz",
2000: "500Hz",
1000: "1kHz"
}
}
......@@ -630,10 +624,6 @@ var FC = {
125: {
defaultLooptime: 1000,
looptimes: {
4000: "250Hz",
3000: "334Hz",
2000: "500Hz",
1500: "667Hz",
1000: "1kHz",
500: "2kHz",
250: "4kHz",
......@@ -643,8 +633,6 @@ var FC = {
1000: {
defaultLooptime: 1000,
looptimes: {
4000: "250Hz",
2000: "500Hz",
1000: "1kHz"
}
}
......@@ -654,32 +642,26 @@ var FC = {
return [
{
tick: 125,
defaultDenominator: 16,
label: "256Hz"
},
{
tick: 1000,
defaultDenominator: 2,
label: "188Hz"
},
{
tick: 1000,
defaultDenominator: 2,
label: "98Hz"
},
{
tick: 1000,
defaultDenominator: 2,
label: "42Hz"
},
{
tick: 1000,
defaultDenominator: 2,
label: "20Hz"
},
{
tick: 1000,
defaultDenominator: 2,
label: "10Hz"
}
];
......@@ -1262,8 +1244,8 @@ var FC = {
1: "Home distance [m]",
2: "Trip distance [m]",
3: "RSSI",
4: "Vbat [deci-Volt] [1V = 10]",
5: "Cell voltage [deci-Volt] [1V = 10]",
4: "Vbat [centi-Volt] [1V = 100]",
5: "Cell voltage [centi-Volt] [1V = 100]",
6: "Current [centi-Amp] [1A = 100]",
7: "Current drawn [mAh]",
8: "GPS Sats",
......
......@@ -2107,7 +2107,7 @@ select {
}
.info-box {
background-color: darkgoldenrod;
background-color: #37a8db;
color: white;
font-weight: bold;
margin: 0.4em 0;
......
......@@ -117,6 +117,10 @@
<option value="50" i18n="adjustmentsFunction50"></option>
<option value="51" i18n="adjustmentsFunction51"></option>
<option value="52" i18n="adjustmentsFunction52"></option>
<option value="53" i18n="adjustmentsFunction53"></option>
<option value="54" i18n="adjustmentsFunction54"></option>
<option value="55" i18n="adjustmentsFunction55"></option>
<option value="56" i18n="adjustmentsFunction56"></option>
</select></td>
<td class="adjustmentSlot"><select class="slot">
<option value="0" i18n="adjustmentsSlot0"></option>
......
......@@ -283,7 +283,7 @@
<label for="w_z_gps_p">
<span data-i18n="w_z_gps_p"></span>
</label>
<div class="helpicon cf_tip" data-i18n_title="w_z_gos_p_help"></div>
<div class="helpicon cf_tip" data-i18n_title="w_z_gps_p_help"></div>
</div>
<div class="number">
<input id="w_z_gps_v" type="number" data-simple-bind="POSITION_ESTIMATOR.w_z_gps_v" step="0.01" min="0" max="10">
......
......@@ -54,15 +54,15 @@
<table class="cf_table acc">
<tr>
<td data-i18n="accZero"></td>
<td><label for="accZeroX"><span>X</span></label><input type="number" name="accZeroX" min="-32768" max="32767"></td>
<td><label for="accZeroY"><span>Y</span></label><input type="number" name="accZeroY" min="-32768" max="32767"></td>
<td><label for="accZeroZ"><span>Z</span></label><input type="number" name="accZeroZ" min="-32768" max="32767"></td>
<td><label for="accZeroX"><span>X</span></label><input readonly disabled type="number" name="accZeroX" min="-32768" max="32767"></td>
<td><label for="accZeroY"><span>Y</span></label><input readonly disabled type="number" name="accZeroY" min="-32768" max="32767"></td>
<td><label for="accZeroZ"><span>Z</span></label><input readonly disabled type="number" name="accZeroZ" min="-32768" max="32767"></td>
</tr>
<tr>
<td data-i18n="accGain"></td>
<td><label for="accGainX"><span>X</span></label><input type="number" name="accGainX" min="1" max="8192"></td>
<td><label for="accGainY"><span>Y</span></label><input type="number" name="accGainY" min="1" max="8192"></td>
<td><label for="accGainZ"><span>Z</span></label><input type="number" name="accGainZ" min="1" max="8192"></td>
<td><label for="accGainX"><span>X</span></label><input readonly disabled type="number" name="accGainX" min="1" max="8192"></td>
<td><label for="accGainY"><span>Y</span></label><input readonly disabled type="number" name="accGainY" min="1" max="8192"></td>
<td><label for="accGainZ"><span>Z</span></label><input readonly disabled type="number" name="accGainZ" min="1" max="8192"></td>
</tr>
</table>
</div>
......@@ -99,27 +99,27 @@
<table id="mag-calibrated-data" class="cf_table">
<tr>
<td><label for="MagX"><span>Zero X</span></label></td>
<td><input type="number" name="MagX" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagX" min="-32768" max="32767"></td>
</tr>
<tr>
<td><label for="MagY"><span>Zero Y</span></label></td>
<td><input type="number" name="MagY" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagY" min="-32768" max="32767"></td>
</tr>
<tr>
<td><label for="MagZ"><span>Zero Z</span></label></td>
<td><input type="number" name="MagZ" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagZ" min="-32768" max="32767"></td>
</tr>
<tr>
<td><label for="MagGainX"><span>Gain X</span></label></td>
<td><input type="number" name="MagGainX" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagGainX" min="-32768" max="32767"></td>
</tr>
<tr>
<td><label for="MagGainY"><span>Gain Y</span></label></td>
<td><input type="number" name="MagGainY" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagGainY" min="-32768" max="32767"></td>
</tr>
<tr>
<td><label for="MagGainZ"><span>Gain Z</span></label></td>
<td><input type="number" name="MagGainZ" min="0" max="2000"></td>
<td><input readonly disabled type="number" name="MagGainZ" min="-32768" max="32767"></td>
</tr>
</table>
</div>
......
......@@ -12,7 +12,6 @@
<div class="spacer_box_title" data-i18n="configurationSystem"></div>
</div>
<div class="spacer_box">
<div id="gyrolpf-info" class="info-box is-hidden"></div>
<div class="select is-hidden">
<select id="gyro-lpf"></select>
<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>
<div class="spacer_box">
<div class="number">
<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="info-box" data-i18n="rollPitchAdjustmentsMoved"></div>
<div class="number">
<input id="board_align_yaw" type="number" name="board_align_yaw" step="0.1" min="-180" max="360" />
<div class="alignicon yaw"></div>
......
......@@ -257,8 +257,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('#content').scrollTop((scrollPosition) ? scrollPosition : 0);
// 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));
// fill magnetometer
......@@ -316,12 +314,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$i2cSpeed.change();
var $looptime = $("#looptime");
var $gyroLpf = $("#gyro-lpf"),
$gyroLpfMessage = $('#gyrolpf-info');
var values = FC.getGyroLpfValues();
let $looptime = $("#looptime"),
$gyroLpf = $("#gyro-lpf"),
values = FC.getGyroLpfValues();
for (i in values) {
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.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();
......@@ -393,11 +351,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} else {
$('#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();
......@@ -512,8 +465,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
helper.features.reset();
helper.features.fromUI($('.tab-configuration'));
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.currentscale = parseInt($('#currentscale').val());
BF_CONFIG.currentoffset = Math.round(parseFloat($('#currentoffset').val()) * 10);
......
......@@ -1425,17 +1425,17 @@ OSD.constants = {
{
name: 'ROLL_PIDS',
id: 16,
preview: 'ROL 40 30 23'
preview: 'ROL 40 30 20 23'
},
{
name: 'PITCH_PIDS',
id: 17,
preview: 'PIT 40 30 23'
preview: 'ROL 40 30 20 23'
},
{
name: 'YAW_PIDS',
id: 18,
preview: 'YAW 85 45 0'
preview: 'YAW 85 45 0 20'
},
{
name: 'LEVEL_PIDS',
......
......@@ -164,27 +164,6 @@
</table>
</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 id="subtab-rates" class="subtab__content">
......@@ -566,6 +545,44 @@
</tbody>
</table>
</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>