1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 14:25:13 +03:00

references to INAV 1.4 removed

This commit is contained in:
Pawel Spychalski (DzikuVx) 2018-05-07 20:56:00 +02:00
parent 47a063dccd
commit 757ca0f5a1
8 changed files with 182 additions and 241 deletions

View file

@ -519,13 +519,9 @@ var FC = {
);
}
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
features.push(
{bit: 28, group: 'esc-priority', name: 'PWM_OUTPUT_ENABLE', haveTip: true}
);
} else {
$('.features.esc-priority').parent().hide();
}
/*
* Transponder disabled until not implemented in firmware

View file

@ -2477,19 +2477,11 @@ var mspHelper = (function (gui) {
};
self.loadFilterConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_FILTER_CONFIG, false, false, callback);
} else {
callback();
}
};
self.loadPidAdvanced = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_PID_ADVANCED, false, false, callback);
} else {
callback();
}
};
self.loadRcTuningData = function (callback) {
@ -2605,11 +2597,7 @@ var mspHelper = (function (gui) {
};
self.saveFilterConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_SET_FILTER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FILTER_CONFIG), false, callback);
} else {
callback();
}
};
self.savePidData = function (callback) {
@ -2625,11 +2613,7 @@ var mspHelper = (function (gui) {
};
self.savePidAdvanced = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_SET_PID_ADVANCED, mspHelper.crunch(MSPCodes.MSP_SET_PID_ADVANCED), false, callback);
} else {
callback();
}
};
self.saveBfConfig = function (callback) {

View file

@ -64,11 +64,7 @@ TABS.adjustments.initialize = function (callback) {
// update list of selected functions
var functionListOptions = $(functionList).find('option');
var availableFunctionCount = 15;
if (semver.gte(CONFIG.flightControllerVersion, '1.4.0')) {
availableFunctionCount = 21;
}
var availableFunctionCount = 21;
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
availableFunctionCount = 32;

View file

@ -317,26 +317,26 @@
</div>
<div class="spacer_box">
<div class="select requires-v1_4">
<div class="select">
<select id="gyro-lpf"></select>
<label for="gyro-lpf"> <span data-i18n="configurationGyroLpfTitle"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationGyroLpfHelp"></div>
</div>
<div class="select requires-v1_4">
<div class="select">
<select id="async-mode"></select>
<label for="async-mode"> <span data-i18n="configurationAsyncMode"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationAsyncModeHelp"></div>
</div>
<div id="gyro-sync-wrapper" class="checkbox requires-v1_4">
<div id="gyro-sync-wrapper" class="checkbox">
<input type="checkbox" id="gyro-sync-checkbox" class="toggle" />
<label for="gyro-sync-checkbox">
<span data-i18n="configurationGyroSyncTitle"></span>
</label>
</div>
<div id="gyro-frequency-wrapper" class="checkbox requires-v1_4">
<div id="gyro-frequency-wrapper" class="checkbox">
<select id="gyro-frequency"></select>
<label for="gyro-frequency">
<span data-i18n="configurationGyroFrequencyTitle"></span>
@ -344,7 +344,7 @@
<div class="helpicon cf_tip" data-i18n_title="configurationGyroFrequencyHelp"></div>
</div>
<div id="accelerometer-frequency-wrapper" class="checkbox requires-v1_4">
<div id="accelerometer-frequency-wrapper" class="checkbox">
<select id="accelerometer-frequency"></select>
<label for="accelerometer-frequency">
<span data-i18n="configurationAccelerometerFrequencyTitle"></span>
@ -352,7 +352,7 @@
<div class="helpicon cf_tip" data-i18n_title="configurationAccelerometerFrequencyHelp"></div>
</div>
<div id="attitude-frequency-wrapper" class="checkbox requires-v1_4">
<div id="attitude-frequency-wrapper" class="checkbox">
<select id="attitude-frequency"></select>
<label for="attitude-frequency">
<span data-i18n="configurationAttitudeFrequencyTitle"></span>

View file

@ -421,9 +421,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
var $looptime = $("#looptime");
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
$(".requires-v1_4").show();
var $gyroLpf = $("#gyro-lpf"),
$gyroSync = $("#gyro-sync-checkbox"),
$asyncMode = $('#async-mode'),
@ -529,17 +526,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
INAV_PID_CONFIG.attitudeTaskFrequency = $attitudeFrequency.val();
});
} else {
GUI.fillSelect($looptime, FC.getLooptimes()[125].looptimes, FC_CONFIG.loopTime, 'Hz');
$looptime.val(FC_CONFIG.loopTime);
$looptime.change(function () {
FC_CONFIG.loopTime = $(this).val();
});
$(".requires-v1_4").hide();
}
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
var $sensorAcc = $('#sensor-acc'),

View file

@ -185,7 +185,7 @@
<input type="number" name="manual_yaw" class="rate-tpa_input" step="1" min="0" max="100" /> %
</td>
</tr>
<tr class="requires-v1_4">
<tr>
<th data-i18n="magHoldYawRate"></th>
<td >
<input type="number" id="magHoldYawRate" class="rate-tpa_input" step="5" min="10" max="250" /> degrees per second
@ -198,8 +198,8 @@
</div>
</form>
<div class="clear-both"></div>
<div class="tab_title requires-v1_4" data-i18n="tabFiltering" style="margin-top: 1em;"></div>
<div class="cf_column half requires-v1_4">
<div class="tab_title" data-i18n="tabFiltering" style="margin-top: 1em;"></div>
<div class="cf_column half">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr>
@ -249,7 +249,7 @@
</tbody>
</table>
</div>
<div class="cf_column half requires-v1_4">
<div class="cf_column half">
<table class="spacer_left rate-tpa rate-tpa--filtering">
<tbody>
<tr>
@ -284,9 +284,9 @@
</table>
</div>
<div class="clear-both requires-v1_4"></div>
<div class="tab_title requires-v1_4" data-i18n="tabMisc" style="margin-top: 1em;"></div>
<div class="cf_column half requires-v1_4">
<div class="clear-both"></div>
<div class="tab_title" data-i18n="tabMisc" style="margin-top: 1em;"></div>
<div class="cf_column half">
<table class="rate-tpa rate-tpa--misc">
<tr>
<th data-i18n="yawJumpPreventionLimit"></th>
@ -318,7 +318,7 @@
</tr>
</table>
</div>
<div class="cf_column half requires-v1_4">
<div class="cf_column half">
<table class="spacer_left rate-tpa rate-tpa--filtering">
<tbody>
<tr>

View file

@ -133,7 +133,6 @@ TABS.pid_tuning.initialize = function (callback) {
pid_and_rc_to_form();
if (semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
var $magHoldYawRate = $("#magHoldYawRate"),
$yawJumpPreventionLimit = $('#yawJumpPreventionLimit'),
$yawPLimit = $('#yawPLimit'),
@ -202,11 +201,6 @@ TABS.pid_tuning.initialize = function (callback) {
PID_ADVANCED.axisAccelerationLimitYaw = Math.round(parseInt($axisAccelerationLimitYaw.val(), 10) / 10);
});
$('.requires-v1_4').show();
} else {
$('.requires-v1_4').hide();
}
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
$('.requires-v1_6').show();
} else {
@ -241,30 +235,15 @@ TABS.pid_tuning.initialize = function (callback) {
}
function saveINAVPidConfig() {
var next_callback = savePidAdvanced;
if(semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_SET_INAV_PID, mspHelper.crunch(MSPCodes.MSP_SET_INAV_PID), false, next_callback);
} else {
next_callback();
}
MSP.send_message(MSPCodes.MSP_SET_INAV_PID, mspHelper.crunch(MSPCodes.MSP_SET_INAV_PID), false, savePidAdvanced);
}
function savePidAdvanced() {
var next_callback = saveFilterConfig;
if(semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_SET_PID_ADVANCED, mspHelper.crunch(MSPCodes.MSP_SET_PID_ADVANCED), false, next_callback);
} else {
next_callback();
}
MSP.send_message(MSPCodes.MSP_SET_PID_ADVANCED, mspHelper.crunch(MSPCodes.MSP_SET_PID_ADVANCED), false, saveFilterConfig);
}
function saveFilterConfig() {
var next_callback = save_to_eeprom;
if(semver.gte(CONFIG.flightControllerVersion, "1.4.0")) {
MSP.send_message(MSPCodes.MSP_SET_FILTER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FILTER_CONFIG), false, next_callback);
} else {
next_callback();
}
MSP.send_message(MSPCodes.MSP_SET_FILTER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FILTER_CONFIG), false, save_to_eeprom);
}
function save_to_eeprom() {

View file

@ -39,7 +39,7 @@ TABS.setup.initialize = function (callback) {
// translate to user-selected language
localize();
if (semver.gte(CONFIG.flightControllerVersion, '1.4.0') && !FC.isMotorOutputEnabled()) {
if (!FC.isMotorOutputEnabled()) {
GUI_control.prototype.log("<span style='color: red; font-weight: bolder'><strong>" + chrome.i18n.getMessage("logPwmOutputDisabled") + "</strong></span>");
}