1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 16:25:19 +03:00
This commit is contained in:
Alexander van Saase 2021-05-06 14:33:27 +02:00
commit 676b1ba69b
11 changed files with 194 additions and 346 deletions

View file

@ -2492,7 +2492,10 @@
"message": "Wireless mode"
},
"rthConfiguration": {
"message": "RTH and Landing Settings"
"message": "RTH settings"
},
"autoLandingSettings": {
"message": "Automatic landing settings"
},
"minRthDistance": {
"message": "Min. RTH distance [cm]"
@ -2542,17 +2545,26 @@
"rthHomeAltitudeHelp": {
"message": "Used when not landing at the home point. Upon arriving at home, the plane will loiter and change altitude to the RTH Home Altitude. Default is 0, which is feature disabled."
},
"landMinAltVspd": {
"message": "Vertical descent velocity under min. vertical landing speed altitude [cm/s]"
},
"landMaxAltVspd": {
"message": "Vertical descent velocity above slowdown altitude [cm/s]"
"message": "<strong>Initial landing speed</strong> until <strong>Slow down altitude</strong> is reached"
},
"landSlowdownMinAlt": {
"message": "Min. vertical landing speed at altitude [cm]"
"landMaxAltVspdHelp": {
"message": "After RTH if autolanding is enabled the aircraft will start to descend at this speed until reaching <strong>Slow down altitude</strong>"
},
"landSlowdownMaxAlt": {
"message": "Vertical landing speed slowdown at altitude [cm]"
"message": "<strong>Slow down altitude</strong>. Altitude bellow which the aircraft will start to slow down"
},
"landSlowdownMaxAltHelp": {
"message": "When the aircraft reaches this altitude it will start to slow down linearly between the <strong>Initial landing speed</strong> and <strong>Final landing speed</strong> to reach it at <strong>Final approach altitude</strong>"
},
"landMinAltVspd": {
"message": "<strong>Final landing speed</strong>. Speed the aircraft will take until touchdown when the <strong>Final approach altitutde</strong> is reached"
},
"landMinAltVspdHelp": {
"message": "The aircraft vertical speed target will be this value when the aircraft reaches the <strong>Final approach altitude</strong> after having slowed down linearly from the <strong>Slow down altitude</strong> at <strong>Initial landing speed</strong>"
},
"landSlowdownMinAlt": {
"message": "<strong>Final approach altitude</strong>. Altitude under which the aircraft will go down at <strong>Final landing speed</strong> until touchdown"
},
"emergencyDescentRate": {
"message": "Emergency landing speed [cm/s]"
@ -3532,16 +3544,16 @@
"itermRelaxCutoffHelp": {
"message": "Lower values open a longer time window for Iterm Relax to work on and stronger Iterm suppression. Higher values shortens the time windows and reduces suppression."
},
"gyro_lpf_type": {
"gyro_main_lpf_hz": {
"message": "Main gyro filter cutoff frequency"
},
"gyro_main_lpf_hz_help": {
"message": "Higher values offer lower delay but more noise. Lower values offer less noise, but more dalay on the gyro processing"
},
"gyro_main_lpf_type": {
"message": "Gyro LPF type"
},
"gyro_lpf_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"gyro_stage2_lowpass_type": {
"message": "Gyro Stage 2 LPF type"
},
"gyro_stage2_lowpass_type_help": {
"gyro_main_lpf_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"dterm_lpf_type": {

View file

@ -34,17 +34,13 @@ helper.defaultsDialog = (function() {
Filtering
*/
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 110
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 0
},
{
key: "dterm_lpf_hz",
value: 110
@ -202,15 +198,15 @@ helper.defaultsDialog = (function() {
value: "256HZ"
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 25
},
{
{
key: "dterm_lpf_hz",
value: 40
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "BIQUAD"
},
{
@ -372,15 +368,15 @@ helper.defaultsDialog = (function() {
value: "256HZ"
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 25
},
{
{
key: "dterm_lpf_hz",
value: 40
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "BIQUAD"
},
{
@ -533,11 +529,11 @@ helper.defaultsDialog = (function() {
value: "256HZ"
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 10
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "BIQUAD"
},
{

View file

@ -166,7 +166,7 @@ GUI_control.prototype.content_ready = function (callback) {
});
// Insert a documentation button next to the tab title
const tabTitle = $('div#content .tab_title');
const tabTitle = $('div#content .tab_title').first();
const documentationDiv = $('<div>').addClass('cf_doc_version_bt');
$('<a>').attr('href', 'https://github.com/iNavFlight/inav/wiki')
.attr('target', '_blank').attr('id', 'button-documentation')

View file

@ -2472,7 +2472,7 @@ var mspHelper = (function (gui) {
};
/**
* Send a request to read a block of data from the dataflash at the given address and pass that address and a dataview
* Send a request to read a block of data from the dataflash at the given address and pass that address and a ArrayBuffer
* of the returned data to the given callback (or null for the data if an error occured).
*/
self.dataflashRead = function (address, onDataCallback) {
@ -2496,7 +2496,7 @@ var mspHelper = (function (gui) {
/* Strip that address off the front of the reply and deliver it separately so the caller doesn't have to
* figure out the reply format:
*/
onDataCallback(address, new DataView(response.data.buffer, response.data.byteOffset + 4, response.data.buffer.byteLength - 4));
onDataCallback(address, response.data.buffer.slice(4));
} else {
// Report error
onDataCallback(address, null);

View file

@ -66,19 +66,11 @@ presets.presets = [
value: 250
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 130
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 150
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -224,19 +216,11 @@ presets.presets = [
value: 500
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 110
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 250
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -374,19 +358,11 @@ presets.presets = [
value: 500
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 100
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 160
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -537,19 +513,11 @@ presets.presets = [
value: 500
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 60
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 120
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -699,19 +667,11 @@ presets.presets = [
value: 250
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 130
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 180
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -865,19 +825,11 @@ presets.presets = [
value: 250
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 115
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 0
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -1023,19 +975,11 @@ presets.presets = [
value: 500
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 100
},
{
key: "gyro_lpf_type",
value: "PT1"
},
{
key: "gyro_stage2_lowpass_hz",
value: 250
},
{
key: "gyro_stage2_lowpass_type",
key: "gyro_main_lpf_type",
value: "PT1"
},
{
@ -1178,7 +1122,7 @@ presets.presets = [
value: "256HZ"
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 25
},
{
@ -1186,7 +1130,7 @@ presets.presets = [
value: 40
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "BIQUAD"
},
{
@ -1344,7 +1288,7 @@ presets.presets = [
value: "256HZ"
},
{
key: "gyro_lpf_hz",
key: "gyro_main_lpf_hz",
value: 25
},
{
@ -1352,7 +1296,7 @@ presets.presets = [
value: 40
},
{
key: "gyro_lpf_type",
key: "gyro_main_lpf_type",
value: "BIQUAD"
},
{

View file

@ -362,26 +362,6 @@
<label for="rthAllowLanding"><span data-i18n="rthAllowLanding"></span></label>
</div>
<div class="number">
<input id="landMinAltVspd" type="number" data-setting="nav_landing_minalt_vspd" data-setting-multiplier="1" step="1" min="50" max="500" />
<label for="landMinAltVspd"><span data-i18n="landMinAltVspd"></span></label>
</div>
<div class="number">
<input id="landMaxAltVspd" type="number" data-setting="nav_landing_maxalt_vspd" data-setting-multiplier="1" step="1" min="100" max="2000" />
<label for="landMaxAltVspd"><span data-i18n="landMaxAltVspd"></span></label>
</div>
<div class="number">
<input id="landSlowdownMinAlt" type="number" data-setting="nav_land_slowdown_minalt" data-setting-multiplier="1" step="1" min="50" max="1000" />
<label for="landSlowdownMinAlt"><span data-i18n="landSlowdownMinAlt"></span></label>
</div>
<div class="number">
<input id="landSlowdownMaxAlt" type="number" data-setting="nav_land_slowdown_maxalt" data-setting-multiplier="1" step="1" min="500" max="4000" />
<label for="landSlowdownMaxAlt"><span data-i18n="landSlowdownMaxAlt"></span></label>
</div>
<div class="number">
<input id="rth-min-distance" type="number" data-setting="nav_min_rth_distance" data-setting-multiplier="1" step="1" min="0" max="5000" />
<label for="rth-min-distance"><span data-i18n="minRthDistance"></span></label>
@ -394,10 +374,6 @@
<div class="helpicon cf_tip" data-i18n_title="rthAbortThresholdHelp"></div>
</div>
<div class="number">
<input id="emergencyDescentRate" type="number" data-setting="nav_emerg_landing_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
<label for="emergencyDescentRate"><span data-i18n="emergencyDescentRate"></span></label>
</div>
</div>
</div>
@ -445,6 +421,42 @@
</div>
</div>
<div class="config-setion gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="autoLandingSettings"></div>
</div>
<div class="spacer_box">
<div class="number">
<input id="landMaxAltVspd" type="number" data-setting="nav_land_maxalt_vspd" data-setting-multiplier="1" step="1" min="100" max="2000" />
<label for="landMaxAltVspd"><span data-i18n="landMaxAltVspd"></span></label>
<div class="helpicon cf_tip" data-i18n_title="landMaxAltVspdHelp"></div>
</div>
<div class="number">
<input id="landSlowdownMaxAlt" type="number" data-setting="nav_land_slowdown_maxalt" data-setting-multiplier="1" step="1" min="500" max="4000" />
<label for="landSlowdownMaxAlt"><span data-i18n="landSlowdownMaxAlt"></span></label>
<div class="helpicon cf_tip" data-i18n_title="landSlowdownMaxAltHelp"></div>
</div>
<div class="number">
<input id="landMinAltVspd" type="number" data-setting="nav_land_minalt_vspd" data-setting-multiplier="1" step="1" min="50" max="500" />
<label for="landMinAltVspd"><span data-i18n="landMinAltVspd"></span></label>
<div class="helpicon cf_tip" data-i18n_title="landMinAltVspdHelp"></div>
</div>
<div class="number">
<input id="landSlowdownMinAlt" type="number" data-setting="nav_land_slowdown_minalt" data-setting-multiplier="1" step="1" min="50" max="1000" />
<label for="landSlowdownMinAlt"><span data-i18n="landSlowdownMinAlt"></span></label>
</div>
<div class="number">
<input id="emergencyDescentRate" type="number" data-setting="nav_emerg_landing_speed" data-setting-multiplier="1" step="1" min="10" max="2000" />
<label for="emergencyDescentRate"><span data-i18n="emergencyDescentRate"></span></label>
</div>
</div>
</div>
</div> <!-- Right wrapper -->
</div> <!-- Common tuning -->

View file

@ -1,3 +1,4 @@
/*global $,nwdialog*/
'use strict';
TABS.firmware_flasher = {};
@ -184,57 +185,41 @@ TABS.firmware_flasher.initialize = function (callback) {
$('select[name="release"]').empty().append('<option value="0">Offline</option>');
});
// UI Hooks
$('a.load_file').click(function () {
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: [{extensions: ['hex']}]}, function (fileEntry) {
if (chrome.runtime.lastError) {
console.error(chrome.runtime.lastError.message);
$('a.load_file').on('click', function () {
return;
}
nwdialog.setContext(document);
nwdialog.openFileDialog('.hex', function(filename) {
const fs = require('fs');
// hide github info (if it exists)
$('div.git_info').slideUp();
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
console.log('Loading file from: ' + path);
console.log('Loading file from: ' + filename);
fileEntry.file(function (file) {
var reader = new FileReader();
fs.readFile(filename, (err, data) => {
reader.onprogress = function (e) {
if (e.total > 104857600) { // 100 MB
// dont allow reading files bigger then 100 MB
console.log('File limit (100 MB) exceeded, aborting');
reader.abort();
}
};
if (err) {
console.log("Error loading local file", err);
return;
}
reader.onloadend = function(e) {
if (e.total != 0 && e.total == e.loaded) {
console.log('File loaded');
console.log('File loaded');
intel_hex = e.target.result;
parse_hex(data.toString(), function (data) {
parsed_hex = data;
parse_hex(intel_hex, function (data) {
parsed_hex = data;
if (parsed_hex) {
googleAnalytics.sendEvent('Flashing', 'Firmware', 'local');
$('a.flash_firmware').removeClass('disabled');
if (parsed_hex) {
googleAnalytics.sendEvent('Flashing', 'Firmware', 'local');
$('a.flash_firmware').removeClass('disabled');
$('span.progressLabel').text('Loaded Local Firmware: (' + parsed_hex.bytes_total + ' bytes)');
} else {
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
}
});
}
};
reader.readAsText(file);
$('span.progressLabel').text('Loaded Local Firmware: (' + parsed_hex.bytes_total + ' bytes)');
} else {
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
}
});
});
});
});
/**

View file

@ -1,4 +1,4 @@
/*global MSP,MSPCodes,BF_CONFIG,TABS,GUI,CONFIGURATOR,helper,mspHelper*/
/*global $,MSP,MSPCodes,BF_CONFIG,TABS,GUI,CONFIGURATOR,helper,mspHelper,nwdialog,SDCARD,chrome*/
'use strict';
var
@ -304,39 +304,34 @@ TABS.onboard_logging.initialize = function (callback) {
if (GUI.connected_to) {
// Begin by refreshing the occupied size in case it changed while the tab was open
flash_update_summary(function() {
var
maxBytes = DATAFLASH.usedSize;
const maxBytes = DATAFLASH.usedSize;
prepare_file(function(fileWriter) {
var
nextAddress = 0;
prepare_file(function(filename) {
const fs = require('fs');
let nextAddress = 0;
show_saving_dialog();
function onChunkRead(chunkAddress, chunkDataView) {
if (chunkDataView != null) {
function onChunkRead(chunkAddress, chunk) {
if (chunk != null) {
// Did we receive any data?
if (chunkDataView.byteLength > 0) {
nextAddress += chunkDataView.byteLength;
if (chunk.byteLength > 0) {
nextAddress += chunk.byteLength;
$(".dataflash-saving progress").attr("value", nextAddress / maxBytes * 100);
var
blob = new Blob([chunkDataView]);
fs.writeFileSync(filename, new Uint8Array(chunk), {
"flag": "a"
})
fileWriter.onwriteend = function(e) {
if (saveCancelled || nextAddress >= maxBytes) {
if (saveCancelled) {
dismiss_saving_dialog();
} else {
mark_saving_dialog_done();
}
} else {
mspHelper.dataflashRead(nextAddress, onChunkRead);
}
};
if (saveCancelled) {
dismiss_saving_dialog();
} else if (nextAddress >= maxBytes) {
mark_saving_dialog_done();
}else {
mspHelper.dataflashRead(nextAddress, onChunkRead);
}
fileWriter.write(blob);
} else {
// A zero-byte block indicates end-of-file, so we're done
mark_saving_dialog_done();
@ -355,50 +350,23 @@ TABS.onboard_logging.initialize = function (callback) {
}
function prepare_file(onComplete) {
var
date = new Date(),
filename = 'blackbox_log_' + date.getFullYear() + '-' + zeroPad(date.getMonth() + 1, 2) + '-'
const date = new Date();
const filename = 'blackbox_log_' + date.getFullYear() + '-' + zeroPad(date.getMonth() + 1, 2) + '-'
+ zeroPad(date.getDate(), 2) + '_' + zeroPad(date.getHours(), 2) + zeroPad(date.getMinutes(), 2)
+ zeroPad(date.getSeconds(), 2);
const accepts = [{
description: 'TXT files', extensions: ['txt'],
}];
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: filename,
accepts: [{extensions: ['TXT']}]}, function(fileEntry) {
var error = chrome.runtime.lastError;
if (error) {
console.error(error.message);
if (error.message != "User cancelled") {
GUI.log(chrome.i18n.getMessage('dataflashFileWriteFailed'));
}
return;
}
// echo/console log path specified
chrome.fileSystem.getDisplayPath(fileEntry, function(path) {
console.log('Dataflash dump file path: ' + path);
});
fileEntry.createWriter(function (fileWriter) {
fileWriter.onerror = function (e) {
console.error(e);
// stop logging if the procedure was/is still running
};
onComplete(fileWriter);
}, function (e) {
// File is not readable or does not exist!
console.error(e);
GUI.log(chrome.i18n.getMessage('dataflashFileWriteFailed'));
});
nwdialog.setContext(document);
nwdialog.saveFileDialog(filename, accepts, '', function(file) {
onComplete(file);
});
}
function ask_to_erase_flash() {
eraseCancelled = false;
$(".dataflash-confirm-erase").removeClass('erasing');
$(".dataflash-confirm-erase")[0].showModal();
}

View file

@ -1,4 +1,4 @@
/*global $*/
/*global $,nwdialog*/
'use strict';
var SYM = SYM || {};
@ -194,31 +194,13 @@ FONT.parseMCMFontFile = function (data) {
//noinspection JSUnusedLocalSymbols
FONT.openFontFile = function ($preview) {
return new Promise(function (resolve) {
//noinspection JSUnresolvedVariable
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: [
{extensions: ['mcm']}
]}, function (fileEntry) {
FONT.data.loaded_font_file = fileEntry.name;
//noinspection JSUnresolvedVariable
if (chrome.runtime.lastError) {
//noinspection JSUnresolvedVariable
console.error(chrome.runtime.lastError.message);
return;
}
fileEntry.file(function (file) {
var reader = new FileReader();
reader.onloadend = function (e) {
//noinspection JSUnresolvedVariable
if (e.total != 0 && e.total == e.loaded) {
FONT.parseMCMFontFile(e.target.result);
resolve();
}
else {
console.error('could not load whole font file');
}
};
reader.readAsText(file);
});
nwdialog.setContext(document);
nwdialog.openFileDialog('.mcm', function(filename) {
const fs = require('fs');
const fontData = fs.readFileSync(filename, {flag: "r"});
FONT.parseMCMFontFile(fontData.toString());
resolve();
});
});
};

View file

@ -263,6 +263,13 @@
<div class="cf_column">
<table class="settings-table settings-table--filtering">
<tbody>
<tr>
<th data-i18n="gyro_main_lpf_hz"></th>
<td>
<input data-setting="gyro_main_lpf_hz" type="number" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="gyro_main_lpf_hz_help"></div>
</td>
</tr>
<tr class="hides-v2_5">
<th>Gyro Dynamic Notch Filter</th>
<td>
@ -324,37 +331,6 @@
<input data-setting="setpoint_kalman_w" type="number" class="rate-tpa_input" />
</td>
</tr>
<tr>
<th data-i18n="gyro_lpf_type"></th>
<td>
<select data-setting="gyro_lpf_type" />
<div class="helpicon cf_tip" data-i18n_title="gyro_lpf_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroLpfCutoffFrequency"></th>
<td>
<input type="number" id="gyroSoftLpfHz" class="rate-tpa_input" step="1" min="0"
max="200" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroLpfCutoffFrequencyHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="gyro_stage2_lowpass_type"></th>
<td>
<select data-setting="gyro_stage2_lowpass_type" />
<div class="helpicon cf_tip" data-i18n_title="gyro_stage2_lowpass_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroStage2LpfCutoffFrequency"></th>
<td>
<input type="number" id="gyroStage2LpfCutoffFrequency"
data-simple-bind="FILTER_CONFIG.gyroStage2LowpassHz" class="rate-tpa_input" step="1"
min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroStage2LpfCutoffFrequencyHelp"></div>
</td>
</tr>
</tbody>
</table>
@ -365,28 +341,13 @@
<div class="cf_column">
<table class="settings-table settings-table--filtering">
<tbody>
<tr>
<th data-i18n="dterm_lpf_type"></th>
<td>
<select data-setting="dterm_lpf_type" />
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="dtermLpfCutoffFrequency"></th>
<td>
<input type="number" id="dtermLpfHz" class="rate-tpa_input" step="1" min="0"
max="200" /> Hz
<input data-setting="dterm_lpf_hz" type="number" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="dtermLpfCutoffFrequencyHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="dterm_lpf2_type"></th>
<td>
<select data-setting="dterm_lpf2_type" />
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf2_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="dterm_lpf2_hz"></th>
<td>

View file

@ -162,33 +162,21 @@ TABS.pid_tuning.initialize = function (callback) {
pid_and_rc_to_form();
var $magHoldYawRate = $("#magHoldYawRate"),
$gyroSoftLpfHz = $('#gyroSoftLpfHz'),
$accSoftLpfHz = $('#accSoftLpfHz'),
$dtermLpfHz = $('#dtermLpfHz'),
$yawLpfHz = $('#yawLpfHz');
$magHoldYawRate.val(INAV_PID_CONFIG.magHoldRateLimit);
$gyroSoftLpfHz.val(FILTER_CONFIG.gyroSoftLpfHz);
$accSoftLpfHz.val(INAV_PID_CONFIG.accSoftLpfHz);
$dtermLpfHz.val(FILTER_CONFIG.dtermLpfHz);
$yawLpfHz.val(FILTER_CONFIG.yawLpfHz);
$magHoldYawRate.change(function () {
INAV_PID_CONFIG.magHoldRateLimit = parseInt($magHoldYawRate.val(), 10);
});
$gyroSoftLpfHz.change(function () {
FILTER_CONFIG.gyroSoftLpfHz = parseInt($gyroSoftLpfHz.val(), 10);
});
$accSoftLpfHz.change(function () {
INAV_PID_CONFIG.accSoftLpfHz = parseInt($accSoftLpfHz.val(), 10);
});
$dtermLpfHz.change(function () {
FILTER_CONFIG.dtermLpfHz = parseInt($dtermLpfHz.val(), 10);
});
$yawLpfHz.change(function () {
FILTER_CONFIG.yawLpfHz = parseInt($yawLpfHz.val(), 10);
});