Merge pull request #656 from iNavFlight/dzikuvx-lpf-messages

Additional messages for gyro LPF
pull/657/head
Paweł Spychalski 6 years ago committed by GitHub
commit c52d63b1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2850,5 +2850,20 @@
},
"looptimeNotAdvised": {
"message": "PID loop might be not stable if GPS is in use"
},
"gyroLpfSuggestedMessage": {
"message": "This is suggested setting for all Multirotors with propeller size below 8 inches. Always check motor temperature after the first flight"
},
"gyroLpfNotAdvisedMessage": {
"message": "It is suggested to choose higher cutoff frequency"
},
"gyroLpfNotFlyableMessage": {
"message": "This setting will probably make UAV unflyable"
},
"gyroLpfWhyNotHigherMessage": {
"message": "If motors are not overheating, try going 256Hz instead"
},
"gyroLpfWhyNotSlightlyHigherMessage": {
"message": "If there are not vibration problems and motors are not overheating, try going 188Hz instead"
}
}

@ -2067,3 +2067,12 @@ select {
padding: 1em;
clear: both;
}
.ok-box {
background-color: green;
color: white;
font-weight: bold;
margin: 0.4em 0;
padding: 1em;
clear: both;
}

@ -355,7 +355,7 @@
<div class="spacer_box_title" data-i18n="configurationSystem"></div>
</div>
<div class="spacer_box">
<div id="gyrolpf-info" class="info-box"></div>
<div class="select">
<select id="gyro-lpf"></select>
<label for="gyro-lpf"> <span data-i18n="configurationGyroLpfTitle"></span></label>

@ -39,6 +39,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
mspHelper.loadINAVPidConfig,
mspHelper.loadSensorConfig,
mspHelper.loadVTXConfig,
mspHelper.loadMixerConfig,
loadCraftName
];
@ -544,7 +545,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$asyncMode = $('#async-mode'),
$gyroFrequency = $('#gyro-frequency'),
$accelerometerFrequency = $('#accelerometer-frequency'),
$attitudeFrequency = $('#attitude-frequency');
$attitudeFrequency = $('#attitude-frequency'),
$gyroLpfMessage = $('#gyrolpf-info');
var values = FC.getGyroLpfValues();
@ -573,6 +575,44 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
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.removeClass('ok-box');
$gyroLpfMessage.removeClass('info-box');
$gyroLpfMessage.removeClass('warning-box');
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
console.log($gyroLpfMessage);
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();

Loading…
Cancel
Save