From 75d2ef8804d015475fb80610a9ad38e6ab758075 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 4 Oct 2024 18:48:14 +0200 Subject: [PATCH] Rename digitalIdlePercent --- locales/en/messages.json | 4 ++-- src/js/fc.js | 2 +- src/js/msp/MSPHelper.js | 4 ++-- src/js/tabs/motors.js | 12 ++++++------ src/tabs/motors.html | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index 8e24310d954..569b0ac3a6b 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1464,10 +1464,10 @@ "configurationGyroCalOnFirstArm": { "message": "Calibrate Gyro on first arm" }, - "configurationDigitalIdlePercent": { + "configurationmotorIdle": { "message": "Motor Idle (%)" }, - "configurationDigitalIdlePercentHelp": { + "configurationmotorIdleHelp": { "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." }, "configurationMotorPoles": { diff --git a/src/js/fc.js b/src/js/fc.js index 2f49d28c810..d28c7fb074a 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 c85d3f32d0e..73c98d4be35 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 d9b113ca1cb..1ebb1fa466c 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"); @@ -765,7 +765,7 @@ motors.initialize = async function (callback) { $('div.checkboxPwm').toggle(analogProtocolConfigured); divUnsyncedPWMFreq.toggle(analogProtocolConfigured); - $('div.digitalIdlePercent').toggle(protocolConfigured + $('div.motorIdle').toggle(protocolConfigured && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47) || (digitalProtocolConfigured && FC.MOTOR_CONFIG.use_dshot_telemetry && FC.ADVANCED_TUNING.idleMinRpm)); @@ -1158,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)); @@ -1226,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); @@ -1257,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 301df8dcce2..1f9c309ed37 100644 --- a/src/tabs/motors.html +++ b/src/tabs/motors.html @@ -99,12 +99,12 @@
-
+
- +
- -
+ +