Skip to content

Commit 2e4dbc0

Browse files
committed
Do the reverse
1 parent b3989bd commit 2e4dbc0

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

locales/en/messages.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@
12821282
"message": "Motor Idle Throttle Value [percent]"
12831283
},
12841284
"configurationDigitalIdlePercentDisabled": {
1285-
"message": "Motor Idle Throttle Value [percent] is disabled because Dynamic Idle is enabled in PID tuning tab"
1285+
"message": "Motor Idle Throttle Value % is disabled because Dynamic Idle is enabled with value at {{dynamicIdle}}rpm in PID tuning tab"
12861286
},
12871287
"configurationDigitalIdlePercentHelp": {
12881288
"message": "The 'DShot idle' value is the percent of maximum throttle that is sent to the ESCs when the throttle at minimum stick position and the craft is armed. Increase it to gain more idle speed and avoid desyncs. Too high and the craft feels floaty."
@@ -4020,6 +4020,9 @@
40204020
"pidTuningIdleMinRpmHelp": {
40214021
"message": "Dynamic Idle improves control at low rpm and reduces risk of motor desyncs. It corrects problems caused by airflow speeding up or slowing down the props, improving PID authority, stability, motor braking and responsiveness. The Dynamic Idle rpm should be set to be about 20% below the rpm of your Dshot Idle value (see the $t(tabMotorTesting.message) tab). Usually there is no need to change your DShot idle value from defaults. For longer inverted hang time, DShot idle value and Minimum rpm should be lowered together.<br /><br />Visit <a href=\"https://github.com/betaflight/betaflight/wiki/Tuning-Dynamic-Idle\"target=\"_blank\" rel=\"noopener noreferrer\">this wiki entry</a> for more info."
40224022
},
4023+
"pidTuningIdleMinRpmDisabled": {
4024+
"message": "Dynamic Idle is disabled as Dshot Telemetry is disabled"
4025+
},
40234026
"pidTuningAcroTrainerAngleLimit": {
40244027
"message": "Acro Trainer Angle Limit"
40254028
},

src/js/tabs/motors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ TABS.motors.initialize = function (callback) {
740740
$('input[name="digitalIdlePercent"]').prop('disabled', protocolConfigured && digitalProtocol && FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry);
741741

742742
if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) {
743-
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled'));
743+
const dynamicIdle = FC.ADVANCED_TUNING.idleMinRpm * 100;
744+
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled', { dynamicIdle }));
744745
} else {
745746
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercent'));
746747
}

src/js/tabs/pid_tuning.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,13 @@ TABS.pid_tuning.initialize = function (callback) {
456456
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
457457
$('.pid_tuning input[name="motorLimit"]').val(FC.ADVANCED_TUNING.motorOutputLimit);
458458
$('.pid_tuning input[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount);
459-
$('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm);
460-
$('.idleMinRpm').toggle(FC.MOTOR_CONFIG.use_dshot_telemetry);
459+
$('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm).prop('disabled', !FC.MOTOR_CONFIG.use_dshot_telemetry);
460+
461+
if (FC.MOTOR_CONFIG.use_dshot_telemetry) {
462+
$('span.pidTuningIdleMinRpmDisabled').text(i18n.getMessage('pidTuningIdleMinRpm'));
463+
} else {
464+
$('span.pidTuningIdleMinRpmDisabled').text(i18n.getMessage('pidTuningIdleMinRpmDisabled'));
465+
}
461466
} else {
462467
$('.motorOutputLimit').hide();
463468
$('.idleMinRpm').hide();

src/tabs/pid_tuning.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
<td colspan="2">
671671
<div>
672672
<label>
673-
<span i18n="pidTuningIdleMinRpm"></span>
673+
<span class="pidTuningIdleMinRpmDisabled"></span>
674674
</label>
675675
<div class="helpicon cf_tip" i18n_title="pidTuningIdleMinRpmHelp"></div>
676676
</div>

0 commit comments

Comments
 (0)