diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index f14a93fa..03a7e67d 100755
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -3244,5 +3244,17 @@
},
"defaultsDialogInfo": {
"message": "INAV Configurator would like to know which kind of UAV you are configuring. Based on this information it will modify some default values to unlock the best flying performance. "
+ },
+ "throttleIdle": {
+ "message": "Motors IDLE power [%]"
+ },
+ "throttleIdleDigitalInfo": {
+ "message": "For digital protocols, IDLE can be lowered even down to 5-7% without motors stopping in the air. If a drone wobbles after pulling throttle low, try increasing IDLE to tune this behavior out."
+ },
+ "throttleIdleAnalogInfo": {
+ "message": "For analog protocols, IDLE can be lowered below 10% if motors are working smooth without stuttering. If a drone wobbles after pulling throttle low, try increasing IDLE to tune this behavior out."
+ },
+ "motor_poles": {
+ "message": "Number of motor poles (number of magnets)"
}
}
diff --git a/js/settings.js b/js/settings.js
index 3414a6cf..f95d8422 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -52,7 +52,15 @@ var Settings = (function () {
input.val(s.value);
} else if (s.setting.type == 'float') {
input.attr('type', 'number');
- input.attr('step', "0.01");
+
+ let dataStep = input.data("step");
+
+ if (dataStep !== undefined) {
+ input.attr('step', dataStep);
+ } else {
+ input.attr('step', "0.01");
+ }
+
input.attr('min', s.setting.min);
input.attr('max', s.setting.max);
input.val(s.value.toFixed(2));
diff --git a/tabs/motors.html b/tabs/motors.html
index 6640b042..e25fbfc1 100644
--- a/tabs/motors.html
+++ b/tabs/motors.html
@@ -53,25 +53,21 @@
-
-
diff --git a/tabs/motors.js b/tabs/motors.js
index fd55dd7a..be641f7e 100644
--- a/tabs/motors.js
+++ b/tabs/motors.js
@@ -43,6 +43,7 @@ TABS.motors.initialize = function (callback) {
var saveChainer = new MSPChainerClass();
saveChainer.setChain([
+ saveSettings,
mspHelper.sendServoConfigurations,
mspHelper.saveAdvancedConfig,
mspHelper.saveBfConfig,
@@ -55,19 +56,31 @@ TABS.motors.initialize = function (callback) {
});
function load_html() {
- GUI.load("./tabs/motors.html", onLoad);
+ GUI.load("./tabs/motors.html", Settings.processHtml(onLoad));
+ }
+
+ function saveSettings(onComplete) {
+ Settings.saveInputs().then(onComplete);
}
function onLoad() {
process_motors();
process_servos();
processConfiguration();
+
+ if (semver.gte(CONFIG.flightControllerVersion, "2.4.0")) {
+ $('.requires-v2_4').show();
+ } else {
+ $('.requires-v2_4').hide();
+ }
+
finalize();
}
function processConfiguration() {
- let escProtocols = FC.getEscProtocols();
- let servoRates = FC.getServoRates();
+ let escProtocols = FC.getEscProtocols(),
+ servoRates = FC.getServoRates(),
+ $idleInfoBox = $("#throttle_idle-info");
function buildMotorRates() {
var protocolData = escProtocols[ADVANCED_CONFIG.motorPwmProtocol];
@@ -88,10 +101,15 @@ TABS.motors.initialize = function (callback) {
}
if (ADVANCED_CONFIG.motorPwmProtocol >= 5) {
- //DSHOT/SERIALSHOT protocols, simplify UI
- $('.hide-for-shot').addClass('is-hidden');
+
+ $idleInfoBox.html(chrome.i18n.getMessage('throttleIdleDigitalInfo'));
+ $idleInfoBox.addClass('ok-box');
+ $idleInfoBox.show();
+
} else {
- $('.hide-for-shot').removeClass('is-hidden');
+ $idleInfoBox.html(chrome.i18n.getMessage('throttleIdleAnalogInfo'));
+ $idleInfoBox.addClass('ok-box');
+ $idleInfoBox.show();
}
if (protocolData.message !== null) {