Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x_locales/en/messages.json15
-rw-r--r--main.css9
-rw-r--r--tabs/configuration.html2
-rw-r--r--tabs/configuration.js42
4 files changed, 66 insertions, 2 deletions
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index c94e247d..e95e32ef 100755
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -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"
}
}
diff --git a/main.css b/main.css
index c42e8aa6..697769a2 100644
--- a/main.css
+++ b/main.css
@@ -2066,4 +2066,13 @@ select {
margin: 0.4em 0;
padding: 1em;
clear: both;
+}
+
+.ok-box {
+ background-color: green;
+ color: white;
+ font-weight: bold;
+ margin: 0.4em 0;
+ padding: 1em;
+ clear: both;
} \ No newline at end of file
diff --git a/tabs/configuration.html b/tabs/configuration.html
index 42cb1dc4..6a23bbe7 100644
--- a/tabs/configuration.html
+++ b/tabs/configuration.html
@@ -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>
diff --git a/tabs/configuration.js b/tabs/configuration.js
index ed4ba11a..7d5cacbf 100644
--- a/tabs/configuration.js
+++ b/tabs/configuration.js
@@ -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();