mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 01:05:12 +03:00
Merge pull request #915 from iNavFlight/dzikuvx-configuration-tab-cleanup
Remove and cleanup on Confuration tab
This commit is contained in:
commit
3aa9452a66
4 changed files with 30 additions and 168 deletions
|
@ -654,12 +654,6 @@
|
||||||
"configurationBoardAlignmentYaw": {
|
"configurationBoardAlignmentYaw": {
|
||||||
"message": "Yaw Degrees"
|
"message": "Yaw Degrees"
|
||||||
},
|
},
|
||||||
"configurationSensorAlignmentGyro": {
|
|
||||||
"message": "GYRO Alignment"
|
|
||||||
},
|
|
||||||
"configurationSensorAlignmentAcc": {
|
|
||||||
"message": "ACCEL Alignment"
|
|
||||||
},
|
|
||||||
"configurationSensorAlignmentMag": {
|
"configurationSensorAlignmentMag": {
|
||||||
"message": "MAG Alignment"
|
"message": "MAG Alignment"
|
||||||
},
|
},
|
||||||
|
|
|
@ -156,11 +156,14 @@ hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-configuration .alignicon {
|
.tab-configuration .alignicon {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
float: left;
|
margin-top: 0px;
|
||||||
margin-left: -5px;
|
margin-left: 6px;
|
||||||
margin-right: 3px;
|
margin-right: 2px;
|
||||||
|
top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-configuration .pitch {
|
.tab-configuration .pitch {
|
||||||
|
@ -179,24 +182,7 @@ hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-configuration .board select {
|
.tab-configuration .board select {
|
||||||
width: 45%;
|
width: 110px;
|
||||||
height: 20px;
|
|
||||||
margin: 0 0 2px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-configuration .sensoralignment {
|
|
||||||
width: 50%;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-configuration .board_align_content {
|
|
||||||
width: 50%;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-configuration .sensoralignment span {
|
|
||||||
width: 55%;
|
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) {
|
@media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) {
|
||||||
|
|
|
@ -22,21 +22,6 @@
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationGyroLpfHelp"></div>
|
<div class="helpicon cf_tip" data-i18n_title="configurationGyroLpfHelp"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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">
|
|
||||||
<select id="gyro-frequency"></select>
|
|
||||||
<label for="gyro-frequency">
|
|
||||||
<span data-i18n="configurationGyroFrequencyTitle"></span>
|
|
||||||
</label>
|
|
||||||
<div class="helpicon cf_tip" data-i18n_title="configurationGyroFrequencyHelp"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="looptime-warning" class="info-box" data-i18n="looptimeNotAdvised"></div>
|
<div id="looptime-warning" class="info-box" data-i18n="looptimeNotAdvised"></div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<select id="looptime"></select>
|
<select id="looptime"></select>
|
||||||
|
@ -90,54 +75,28 @@
|
||||||
<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="board_align_content">
|
<div class="number">
|
||||||
<div class="number">
|
<input type="number" id="board_align_roll" name="board_align_roll" step="0.1" min="-180" max="360" />
|
||||||
<label> <input type="number" name="board_align_roll" step="0.1" min="-180" max="360" /> <span
|
<div class="alignicon roll"></div>
|
||||||
data-i18n="configurationBoardAlignmentRoll"></span>
|
<label for="board_align_roll" data-i18n="configurationBoardAlignmentRoll"></label>
|
||||||
</label>
|
|
||||||
<div class="alignicon roll"></div>
|
|
||||||
</div>
|
|
||||||
<div class="number">
|
|
||||||
<label> <input type="number" name="board_align_pitch" step="0.1" min="-180" max="360" />
|
|
||||||
<span data-i18n="configurationBoardAlignmentPitch"></span>
|
|
||||||
</label>
|
|
||||||
<div class="alignicon pitch"></div>
|
|
||||||
</div>
|
|
||||||
<div class="number">
|
|
||||||
<label> <input type="number" name="board_align_yaw" step="0.1" min="-180" max="360" /> <span
|
|
||||||
data-i18n="configurationBoardAlignmentYaw"></span>
|
|
||||||
</label>
|
|
||||||
<div class="alignicon yaw"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sensoralignment">
|
<div class="number">
|
||||||
<div class="select">
|
<input type="number" id="board_align_pitch" name="board_align_pitch" step="0.1" min="-180" max="360" />
|
||||||
<label>
|
<div class="alignicon pitch"></div>
|
||||||
<span data-i18n="configurationSensorAlignmentGyro"></span>
|
<label for="board_align_pitch" data-i18n="configurationBoardAlignmentPitch"></label>
|
||||||
<select class="gyroalign">
|
</div>
|
||||||
<option value="0">Default</option>
|
<div class="number">
|
||||||
<!-- list generated here -->
|
<input id="board_align_yaw" type="number" name="board_align_yaw" step="0.1" min="-180" max="360" />
|
||||||
</select>
|
<div class="alignicon yaw"></div>
|
||||||
</label>
|
<label for="board_align_yaw" data-i18n="configurationBoardAlignmentYaw"></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="select">
|
<div class="select" style="position: relative; top: -3px;">
|
||||||
<label>
|
<select id="magalign" class="magalign">
|
||||||
<span data-i18n="configurationSensorAlignmentAcc"></span>
|
<option value="0">Default</option>
|
||||||
<select class="accalign">
|
<!-- list generated here -->
|
||||||
<option value="0">Default</option>
|
</select>
|
||||||
<!-- list generated here -->
|
<div class="alignicon yaw"></div>
|
||||||
</select>
|
<label for="magalign" data-i18n="configurationSensorAlignmentMag"></label>
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="select">
|
|
||||||
<label>
|
|
||||||
<span data-i18n="configurationSensorAlignmentMag"></span>
|
|
||||||
<select class="magalign">
|
|
||||||
<option value="0">Default</option>
|
|
||||||
<!-- list generated here -->
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -189,19 +189,12 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
// translate to user-selected language
|
// translate to user-selected language
|
||||||
localize();
|
localize();
|
||||||
|
|
||||||
var alignments = FC.getSensorAlignments();
|
let alignments = FC.getSensorAlignments();
|
||||||
|
let orientation_mag_e = $('select.magalign');
|
||||||
var orientation_gyro_e = $('select.gyroalign');
|
|
||||||
var orientation_acc_e = $('select.accalign');
|
|
||||||
var orientation_mag_e = $('select.magalign');
|
|
||||||
|
|
||||||
for (i = 0; i < alignments.length; i++) {
|
for (i = 0; i < alignments.length; i++) {
|
||||||
orientation_gyro_e.append('<option value="' + (i + 1) + '">' + alignments[i] + '</option>');
|
|
||||||
orientation_acc_e.append('<option value="' + (i + 1) + '">' + alignments[i] + '</option>');
|
|
||||||
orientation_mag_e.append('<option value="' + (i + 1) + '">' + alignments[i] + '</option>');
|
orientation_mag_e.append('<option value="' + (i + 1) + '">' + alignments[i] + '</option>');
|
||||||
}
|
}
|
||||||
orientation_gyro_e.val(SENSOR_ALIGNMENT.align_gyro);
|
|
||||||
orientation_acc_e.val(SENSOR_ALIGNMENT.align_acc);
|
|
||||||
orientation_mag_e.val(SENSOR_ALIGNMENT.align_mag);
|
orientation_mag_e.val(SENSOR_ALIGNMENT.align_mag);
|
||||||
|
|
||||||
// generate GPS
|
// generate GPS
|
||||||
|
@ -368,11 +361,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
var $looptime = $("#looptime");
|
var $looptime = $("#looptime");
|
||||||
|
|
||||||
var $gyroLpf = $("#gyro-lpf"),
|
var $gyroLpf = $("#gyro-lpf"),
|
||||||
$gyroSync = $("#gyro-sync-checkbox"),
|
|
||||||
$asyncMode = $('#async-mode'),
|
|
||||||
$gyroFrequency = $('#gyro-frequency'),
|
|
||||||
$accelerometerFrequency = $('#accelerometer-frequency'),
|
|
||||||
$attitudeFrequency = $('#attitude-frequency'),
|
|
||||||
$gyroLpfMessage = $('#gyrolpf-info');
|
$gyroLpfMessage = $('#gyrolpf-info');
|
||||||
|
|
||||||
var values = FC.getGyroLpfValues();
|
var values = FC.getGyroLpfValues();
|
||||||
|
@ -385,7 +373,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$gyroLpf.val(INAV_PID_CONFIG.gyroscopeLpf);
|
$gyroLpf.val(INAV_PID_CONFIG.gyroscopeLpf);
|
||||||
$gyroSync.prop("checked", ADVANCED_CONFIG.gyroSync);
|
|
||||||
|
|
||||||
$gyroLpf.change(function () {
|
$gyroLpf.change(function () {
|
||||||
INAV_PID_CONFIG.gyroscopeLpf = $gyroLpf.val();
|
INAV_PID_CONFIG.gyroscopeLpf = $gyroLpf.val();
|
||||||
|
@ -399,10 +386,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();
|
||||||
|
|
||||||
GUI.fillSelect($gyroFrequency, FC.getGyroFrequencies()[FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick].looptimes);
|
|
||||||
$gyroFrequency.val(FC.getLooptimes()[FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick].defaultLooptime);
|
|
||||||
$gyroFrequency.change();
|
|
||||||
|
|
||||||
$gyroLpfMessage.hide();
|
$gyroLpfMessage.hide();
|
||||||
$gyroLpfMessage.removeClass('ok-box');
|
$gyroLpfMessage.removeClass('ok-box');
|
||||||
$gyroLpfMessage.removeClass('info-box');
|
$gyroLpfMessage.removeClass('info-box');
|
||||||
|
@ -460,63 +443,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
});
|
});
|
||||||
$looptime.change();
|
$looptime.change();
|
||||||
|
|
||||||
$gyroFrequency.val(ADVANCED_CONFIG.gyroSyncDenominator * FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick);
|
|
||||||
$gyroFrequency.change(function () {
|
|
||||||
ADVANCED_CONFIG.gyroSyncDenominator = Math.floor($gyroFrequency.val() / FC.getGyroLpfValues()[INAV_PID_CONFIG.gyroscopeLpf].tick);
|
|
||||||
});
|
|
||||||
|
|
||||||
$gyroSync.change(function () {
|
|
||||||
if ($(this).is(":checked")) {
|
|
||||||
ADVANCED_CONFIG.gyroSync = 1;
|
|
||||||
} else {
|
|
||||||
ADVANCED_CONFIG.gyroSync = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$gyroSync.change();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Async mode select
|
|
||||||
*/
|
|
||||||
GUI.fillSelect($asyncMode, FC.getAsyncModes());
|
|
||||||
$asyncMode.val(INAV_PID_CONFIG.asynchronousMode);
|
|
||||||
$asyncMode.change(function () {
|
|
||||||
INAV_PID_CONFIG.asynchronousMode = $asyncMode.val();
|
|
||||||
|
|
||||||
if (INAV_PID_CONFIG.asynchronousMode == 0) {
|
|
||||||
$('#gyro-sync-wrapper').show();
|
|
||||||
$('#gyro-frequency-wrapper').hide();
|
|
||||||
$('#accelerometer-frequency-wrapper').hide();
|
|
||||||
$('#attitude-frequency-wrapper').hide();
|
|
||||||
} else if (INAV_PID_CONFIG.asynchronousMode == 1) {
|
|
||||||
$('#gyro-sync-wrapper').hide();
|
|
||||||
$('#gyro-frequency-wrapper').show();
|
|
||||||
$('#accelerometer-frequency-wrapper').hide();
|
|
||||||
$('#attitude-frequency-wrapper').hide();
|
|
||||||
ADVANCED_CONFIG.gyroSync = 1;
|
|
||||||
} else {
|
|
||||||
$('#gyro-sync-wrapper').hide();
|
|
||||||
$('#gyro-frequency-wrapper').show();
|
|
||||||
$('#accelerometer-frequency-wrapper').show();
|
|
||||||
$('#attitude-frequency-wrapper').show();
|
|
||||||
ADVANCED_CONFIG.gyroSync = 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$asyncMode.change();
|
|
||||||
|
|
||||||
GUI.fillSelect($accelerometerFrequency, FC.getAccelerometerTaskFrequencies(), INAV_PID_CONFIG.accelerometerTaskFrequency, 'Hz');
|
|
||||||
$accelerometerFrequency.val(INAV_PID_CONFIG.accelerometerTaskFrequency);
|
|
||||||
$accelerometerFrequency.change(function () {
|
|
||||||
INAV_PID_CONFIG.accelerometerTaskFrequency = $accelerometerFrequency.val();
|
|
||||||
});
|
|
||||||
|
|
||||||
GUI.fillSelect($attitudeFrequency, FC.getAttitudeTaskFrequencies(), INAV_PID_CONFIG.attitudeTaskFrequency, 'Hz');
|
|
||||||
$attitudeFrequency.val(INAV_PID_CONFIG.attitudeTaskFrequency);
|
|
||||||
$attitudeFrequency.change(function () {
|
|
||||||
INAV_PID_CONFIG.attitudeTaskFrequency = $attitudeFrequency.val();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var $sensorAcc = $('#sensor-acc'),
|
var $sensorAcc = $('#sensor-acc'),
|
||||||
$sensorMag = $('#sensor-mag'),
|
$sensorMag = $('#sensor-mag'),
|
||||||
$sensorBaro = $('#sensor-baro'),
|
$sensorBaro = $('#sensor-baro'),
|
||||||
|
@ -604,9 +530,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
_3D.deadband3d_throttle = ($('#3ddeadbandthrottle').val());
|
_3D.deadband3d_throttle = ($('#3ddeadbandthrottle').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SENSOR_ALIGNMENT.align_gyro = parseInt(orientation_gyro_e.val());
|
|
||||||
SENSOR_ALIGNMENT.align_acc = parseInt(orientation_acc_e.val());
|
|
||||||
SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val());
|
SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val());
|
||||||
|
|
||||||
craftName = $('input[name="craft_name"]').val();
|
craftName = $('input[name="craft_name"]').val();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue