mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
Merge branch 'master' into advanced-tuning-tab
This commit is contained in:
commit
fea2505fde
6 changed files with 113 additions and 3 deletions
|
@ -1930,5 +1930,41 @@
|
|||
},
|
||||
"presetApplyHead": {
|
||||
"message": "Applies following settings:"
|
||||
},
|
||||
"gyroNotchHz1": {
|
||||
"message": "First gyro notch filter freq."
|
||||
},
|
||||
"gyroNotchCutoff1": {
|
||||
"message": "First gyro notch filter cutoff freq."
|
||||
},
|
||||
"gyroNotchHz2": {
|
||||
"message": "Second gyro notch filter freq."
|
||||
},
|
||||
"gyroNotchCutoff2": {
|
||||
"message": "Second gyro notch filter cutoff freq."
|
||||
},
|
||||
"gyroNotchHz1Help": {
|
||||
"message": "Should be tuned to propeller harmonic frequency. Usually equals <i>[motor_frequency] * [propeller_blades_number]</i><br><br>Has to be above cutoff frequency<br><br><i>0</i> disables the filter"
|
||||
},
|
||||
"gyroNotchHz2Help": {
|
||||
"message": "Should be tuned to motor frequency.<br><br>Has to be above cutoff frequency and below first gyro notch filter frequency.<br><br><i>0</i> disables the filter"
|
||||
},
|
||||
"gyroNotchCutoff1Help": {
|
||||
"message": "Defines band of notch filter. <br><br>Has to be kept below notch filter frequency."
|
||||
},
|
||||
"gyroNotchCutoff2Help": {
|
||||
"message": "Defines band of notch filter. <br><br>Has to be kept below notch filter frequency."
|
||||
},
|
||||
"dtermNotchHz": {
|
||||
"message": "Dterm notch filter freq."
|
||||
},
|
||||
"dtermNotchCutoff": {
|
||||
"message": "Dterm notch filter cutoff freq."
|
||||
},
|
||||
"dtermNotchHzHelp": {
|
||||
"message": "Should be placed between first and second gyro notch filter frequency<br><br>Has to be above cutoff frequency<br><br><i>0</i> disables the filter"
|
||||
},
|
||||
"dtermNotchCutoffHelp": {
|
||||
"message": "Defines band of filter. <br><br>Has to be kept below notch filter frequency."
|
||||
}
|
||||
}
|
3
js/fc.js
3
js/fc.js
|
@ -252,7 +252,8 @@ var FC = {
|
|||
yawPLimit: null,
|
||||
axisAccelerationLimitRollPitch: null,
|
||||
axisAccelerationLimitYaw: null,
|
||||
dtermSetpointWeight: null
|
||||
dtermSetpointWeight: null,
|
||||
pidSumLimit: null
|
||||
};
|
||||
|
||||
INAV_PID_CONFIG = {
|
||||
|
|
18
js/gui.js
18
js/gui.js
|
@ -221,5 +221,23 @@ GUI_control.prototype.fillSelect = function ($element, values, currentValue, uni
|
|||
}
|
||||
};
|
||||
|
||||
GUI_control.prototype.simpleBind = function () {
|
||||
$('input[data-simple-bind]').not('[data-simple-binded="true"]').each(function () {
|
||||
var $this = $(this),
|
||||
toBind = $this.data('simple-bind').split(".");
|
||||
|
||||
if (toBind.length !== 2 || window[toBind[0]][toBind[1]] === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this.change(function () {
|
||||
window[toBind[0]][toBind[1]] = $(this).val();
|
||||
});
|
||||
|
||||
$this.val(window[toBind[0]][toBind[1]]);
|
||||
$this.attr('data-simple-binded', true);
|
||||
});
|
||||
};
|
||||
|
||||
// initialize object into GUI variable
|
||||
var GUI = new GUI_control();
|
||||
|
|
|
@ -846,6 +846,7 @@ var mspHelper = (function (gui) {
|
|||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
PID_ADVANCED.dtermSetpointWeight = data.getUint8(9);
|
||||
PID_ADVANCED.pidSumLimit = data.getUint16(10, true);
|
||||
}
|
||||
|
||||
PID_ADVANCED.axisAccelerationLimitRollPitch = data.getUint16(13, true);
|
||||
|
@ -1262,12 +1263,14 @@ var mspHelper = (function (gui) {
|
|||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
buffer.push(PID_ADVANCED.dtermSetpointWeight);
|
||||
buffer.push(lowByte(PID_ADVANCED.pidSumLimit));
|
||||
buffer.push(highByte(PID_ADVANCED.pidSumLimit));
|
||||
} else {
|
||||
buffer.push(0);
|
||||
buffer.push(0); // reserved
|
||||
buffer.push(0); // reserved
|
||||
}
|
||||
|
||||
buffer.push(0); // reserved
|
||||
buffer.push(0); // reserved
|
||||
buffer.push(0); //BF: currentProfile->pidProfile.itermThrottleGain
|
||||
|
||||
buffer.push(lowByte(PID_ADVANCED.axisAccelerationLimitRollPitch));
|
||||
|
|
|
@ -219,6 +219,35 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="gyroNotchHz1"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchHz1" id="gyroNotchHz1" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="gyroNotchHz1Help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="gyroNotchCutoff1"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchCutoff1" id="gyroNotchCutoff1" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="gyroNotchCutoff1Help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="gyroNotchHz2"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchHz2" id="gyroNotchHz2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="gyroNotchHz2Help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="gyroNotchCutoff2"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchCutoff2" id="gyroNotchCutoff2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="gyroNotchCutoff2Help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -239,6 +268,20 @@
|
|||
<div class="helpicon cf_tip" data-i18n_title="yawLpfCutoffFrequencyHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="dtermNotchHz"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.dtermNotchHz" id="dtermNotchHz" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="dtermNotchHzHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="requires-v1_6">
|
||||
<th data-i18n="dtermNotchCutoff"></th>
|
||||
<td>
|
||||
<input type="number" data-simple-bind="FILTER_CONFIG.dtermNotchCutoff" id="dtermNotchCutoff" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
|
||||
<div class="helpicon cf_tip" data-i18n_title="dtermNotchCutoffHelp"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -231,6 +231,15 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
} else {
|
||||
$('.requires-v1_4').hide();
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
|
||||
$('.requires-v1_6').show();
|
||||
} else {
|
||||
$('.requires-v1_6').hide();
|
||||
}
|
||||
|
||||
GUI.simpleBind();
|
||||
|
||||
// UI Hooks
|
||||
|
||||
$('a.refresh').click(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue