diff --git a/locales/en/messages.json b/locales/en/messages.json index 8e24310d95..d7aaeedd2e 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1464,11 +1464,11 @@ "configurationGyroCalOnFirstArm": { "message": "Calibrate Gyro on first arm" }, - "configurationDigitalIdlePercent": { + "configurationMotorIdle": { "message": "Motor Idle (%)" }, - "configurationDigitalIdlePercentHelp": { - "message": "The Motor Idle value sets the idle speed of the motors when throttle is at minimum position.

Dynamic Idle disabled

The lowest throttle value sent to any motor, while armed, as a percentage of full throttle. Increase it to improve motor startup reliability, to avoid desyncs, and to improve PID responsiveness at low throttle.

Too low: the motors may not start up reliably, or desync at the end of a flip or roll or on hard throttle chops.

Too high: the craft may feel 'floaty'.

Dynamic idle enabled

The maximum throttle allowed, after arming, before takeoff. If RPM is less than dyn_idle_min_rpm, or zero, this throttle value will be sent to the motors. When the motors start spinning, throttle is adjusted to maintain the set RPM, but cannot exceed this value until the quad takes off.

Too low: the motors may not start up reliably.

Too high: the craft may shake on the ground before takeoff." + "configurationMotorIdleHelp": { + "message": "Sets the idle speed of the motors while armed and throttle is 'low' (below `min_check`).

Dynamic Idle not enabled

Each motor gets `min_command` plus Motor Idle percent.

Idle too low: motors may not start reliably, spin up slowly, or desync in flips or rolls.

Idle too high: the craft may feel 'floaty'.

Note: analog ESC's must be calibrated so the motors start just above `min_command`.

Dynamic Idle enabled

On arming, the 'normal' idle value is sent to each motor, until they spin up.

Once spinning, the motor signal is adjusted to achieve the target RPM.

Before takeoff, the motor signal is limited to the Motor Idle percentage, and the set RPM may not be achieved. This is OK. When throttle is raised above the `airmode_motor_start_throttle` percentage, the limit is much higher, and the set RPM should be achieved at idle.

Idle too low: motors may not start reliably

Idle too high: shaking before takeoff (only if dynamic idle is also high)

Note: Dynamic Idle requires DShot and DShot Telemetry." }, "configurationMotorPoles": { "message": "Motor poles", diff --git a/src/js/fc.js b/src/js/fc.js index 2f49d28c81..d28c7fb074 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -479,7 +479,7 @@ const FC = { use_unsyncedPwm: 0, fast_pwm_protocol: 0, motor_pwm_rate: 0, - digitalIdlePercent: 0, + motorIdle: 0, gyroUse32kHz: 0, motorPwmInversion: 0, gyroHighFsr: 0, diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js index c85d3f32d0..73c98d4be3 100644 --- a/src/js/msp/MSPHelper.js +++ b/src/js/msp/MSPHelper.js @@ -1048,7 +1048,7 @@ MspHelper.prototype.process_data = function(dataHandler) { FC.PID_ADVANCED_CONFIG.use_unsyncedPwm = data.readU8(); FC.PID_ADVANCED_CONFIG.fast_pwm_protocol = EscProtocols.ReorderPwmProtocols(FC.CONFIG.apiVersion, data.readU8()); FC.PID_ADVANCED_CONFIG.motor_pwm_rate = data.readU16(); - FC.PID_ADVANCED_CONFIG.digitalIdlePercent = data.readU16() / 100; + FC.PID_ADVANCED_CONFIG.motorIdle = data.readU16() / 100; data.readU8(); // gyroUse32Khz is not supported // Introduced in 1.42 FC.PID_ADVANCED_CONFIG.motorPwmInversion = data.readU8(); @@ -2002,7 +2002,7 @@ MspHelper.prototype.crunch = function(code, modifierCode = undefined) { .push8(FC.PID_ADVANCED_CONFIG.use_unsyncedPwm) .push8(EscProtocols.ReorderPwmProtocols(FC.CONFIG.apiVersion, FC.PID_ADVANCED_CONFIG.fast_pwm_protocol)) .push16(FC.PID_ADVANCED_CONFIG.motor_pwm_rate) - .push16(FC.PID_ADVANCED_CONFIG.digitalIdlePercent * 100) + .push16(FC.PID_ADVANCED_CONFIG.motorIdle * 100) .push8(0); // gyroUse32kHz not used // Introduced in 1.42 diff --git a/src/js/tabs/motors.js b/src/js/tabs/motors.js index b681d4f77e..1ebb1fa466 100644 --- a/src/js/tabs/motors.js +++ b/src/js/tabs/motors.js @@ -278,7 +278,7 @@ motors.initialize = async function (callback) { feature27: FC.FEATURE_CONFIG.features.isEnabled('ESC_SENSOR'), dshotBidir: FC.MOTOR_CONFIG.use_dshot_telemetry, motorPoles: FC.MOTOR_CONFIG.motor_poles, - digitalIdlePercent: FC.PID_ADVANCED_CONFIG.digitalIdlePercent, + motorIdle: FC.PID_ADVANCED_CONFIG.motorIdle, idleMinRpm: FC.ADVANCED_TUNING.idleMinRpm, _3ddeadbandlow: FC.MOTOR_3D_CONFIG.deadband3d_low, _3ddeadbandhigh: FC.MOTOR_3D_CONFIG.deadband3d_high, @@ -691,7 +691,7 @@ motors.initialize = async function (callback) { unsyncedPWMSwitchElement.prop('checked', FC.PID_ADVANCED_CONFIG.use_unsyncedPwm !== 0).trigger("change"); $('input[name="unsyncedpwmfreq"]').val(FC.PID_ADVANCED_CONFIG.motor_pwm_rate); - $('input[name="digitalIdlePercent"]').val(FC.PID_ADVANCED_CONFIG.digitalIdlePercent); + $('input[name="motorIdle"]').val(FC.PID_ADVANCED_CONFIG.motorIdle); $('input[name="idleMinRpm"]').val(FC.ADVANCED_TUNING.idleMinRpm); dshotBidirElement.prop('checked', FC.MOTOR_CONFIG.use_dshot_telemetry).trigger("change"); @@ -755,24 +755,25 @@ motors.initialize = async function (callback) { default: } + const analogProtocolConfigured = protocolConfigured && !digitalProtocol; + const digitalProtocolConfigured = protocolConfigured && digitalProtocol; const rpmFeaturesVisible = digitalProtocol && dshotBidirElement.is(':checked') || $("input[name='ESC_SENSOR']").is(':checked'); - $('div.minthrottle').toggle(protocolConfigured && !digitalProtocol); - $('div.maxthrottle').toggle(protocolConfigured && !digitalProtocol); - $('div.mincommand').toggle(protocolConfigured && !digitalProtocol); - $('div.checkboxPwm').toggle(protocolConfigured && !digitalProtocol); - divUnsyncedPWMFreq.toggle(protocolConfigured && !digitalProtocol); + $('div.minthrottle').toggle(analogProtocolConfigured && semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_47)); + $('div.maxthrottle').toggle(analogProtocolConfigured); + $('div.mincommand').toggle(analogProtocolConfigured); + $('div.checkboxPwm').toggle(analogProtocolConfigured); + divUnsyncedPWMFreq.toggle(analogProtocolConfigured); - $('div.digitalIdlePercent').toggle(protocolConfigured && digitalProtocol); - $('div.idleMinRpm').toggle(protocolConfigured && digitalProtocol && FC.MOTOR_CONFIG.use_dshot_telemetry); + $('div.motorIdle').toggle(protocolConfigured + && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47) + || (digitalProtocolConfigured && FC.MOTOR_CONFIG.use_dshot_telemetry && FC.ADVANCED_TUNING.idleMinRpm)); - if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_47) && FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) { - $('div.digitalIdlePercent').hide(); - } + $('div.idleMinRpm').toggle(protocolConfigured && digitalProtocol && FC.MOTOR_CONFIG.use_dshot_telemetry); - $('.escSensor').toggle(protocolConfigured && digitalProtocol); + $('.escSensor').toggle(digitalProtocolConfigured); - $('div.checkboxDshotBidir').toggle(protocolConfigured && digitalProtocol); + $('div.checkboxDshotBidir').toggle(digitalProtocolConfigured); $('div.motorPoles').toggle(protocolConfigured && rpmFeaturesVisible); $('.escMotorStop').toggle(protocolConfigured); @@ -1157,7 +1158,7 @@ motors.initialize = async function (callback) { FC.PID_ADVANCED_CONFIG.fast_pwm_protocol = parseInt(escProtocolElement.val() - 1); FC.PID_ADVANCED_CONFIG.use_unsyncedPwm = unsyncedPWMSwitchElement.is(':checked') ? 1 : 0; FC.PID_ADVANCED_CONFIG.motor_pwm_rate = parseInt($('input[name="unsyncedpwmfreq"]').val()); - FC.PID_ADVANCED_CONFIG.digitalIdlePercent = parseFloat($('input[name="digitalIdlePercent"]').val()); + FC.PID_ADVANCED_CONFIG.motorIdle = parseFloat($('input[name="motorIdle"]').val()); await MSP.promise(MSPCodes.MSP_SET_FEATURE_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FEATURE_CONFIG)); await MSP.promise(MSPCodes.MSP_SET_MIXER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_MIXER_CONFIG)); @@ -1225,7 +1226,7 @@ motors.initialize = async function (callback) { function setup_motor_output_reordering_dialog(callbackFunction, zeroThrottleValue) { const domDialogMotorOutputReorder = $('#dialogMotorOutputReorder'); - const idleThrottleValue = zeroThrottleValue + FC.PID_ADVANCED_CONFIG.digitalIdlePercent * 1000 / 100; + const idleThrottleValue = zeroThrottleValue + FC.PID_ADVANCED_CONFIG.motorIdle * 1000 / 100; const motorOutputReorderComponent = new MotorOutputReorderComponent($('#dialogMotorOutputReorderContent'), callbackFunction, mixerList[FC.MIXER_CONFIG.mixer - 1].name, zeroThrottleValue, idleThrottleValue); @@ -1256,7 +1257,7 @@ motors.initialize = async function (callback) { function SetupdescDshotDirectionDialog(callbackFunction, zeroThrottleValue) { const domEscDshotDirectionDialog = $('#escDshotDirectionDialog'); - const idleThrottleValue = zeroThrottleValue + FC.PID_ADVANCED_CONFIG.digitalIdlePercent * 1000 / 100; + const idleThrottleValue = zeroThrottleValue + FC.PID_ADVANCED_CONFIG.motorIdle * 1000 / 100; const motorConfig = { numberOfMotors: self.numberOfValidOutputs, motorStopValue: zeroThrottleValue, diff --git a/src/tabs/motors.html b/src/tabs/motors.html index 301df8dcce..99e8a7fde3 100644 --- a/src/tabs/motors.html +++ b/src/tabs/motors.html @@ -99,12 +99,12 @@
-
+
- +
- -
+ +
@@ -113,6 +113,13 @@
+
+
+ +
+ +
+
@@ -126,13 +133,6 @@
-
-
- -
- -
-