Skip to content

Commit f83c460

Browse files
authored
Fix/improve dynamicIdle hidding (#3624)
Fix dynamicIdle hidding removed unused api version import sinplify hidding, idlerpm disabled string improve revert simplifing simplifing digitalIdle hidding revert sinplifing
1 parent af9ec79 commit f83c460

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4533,7 +4533,7 @@
45334533
"message": "Dynamic Idle improves control at low rpm and reduces risk of motor desyncs. <br /><br /> It improves PID authority, zero throttle stability, inverted hang time, and motor braking.<br /><br />The Dynamic Idle min rpm should be set to around 3000 - 3500 rpm. <br /><br />Visit <a href=\"https://betaflight.com/docs/wiki/archive/Tuning-Dynamic-Idle\" target=\"_blank\" rel=\"noopener noreferrer\">this wiki entry</a> for more info."
45344534
},
45354535
"pidTuningIdleMinRpmDisabled": {
4536-
"message": "Dynamic Idle is OFF because Dshot Telemetry is OFF"
4536+
"message": "Dynamic Idle is DISABLED because Dshot Telemetry is OFF"
45374537
},
45384538
"pidTuningAcroTrainerAngleLimit": {
45394539
"message": "Acro Trainer Angle Limit"

src/js/tabs/motors.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import FC from "../fc";
1212
import MSP from "../msp";
1313
import { mixerList } from "../model";
1414
import MSPCodes from "../msp/MSPCodes";
15-
import { API_VERSION_1_42, API_VERSION_1_44, API_VERSION_1_46 } from "../data_storage";
15+
import { API_VERSION_1_42, API_VERSION_1_44 } from "../data_storage";
1616
import EscProtocols from "../utils/EscProtocols";
1717
import { updateTabList } from "../utils/updateTabList";
1818
import { isInt, getMixerImageSrc } from "../utils/common";
@@ -772,19 +772,8 @@ motors.initialize = async function (callback) {
772772

773773
$('div.digitalIdlePercent').toggle(protocolConfigured && digitalProtocol);
774774

775-
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
776-
$('input[name="digitalIdlePercent"]').prop('disabled', protocolConfigured && digitalProtocol && FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry);
777-
}
778-
779775
if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) {
780-
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
781-
$('div.digitalIdlePercent').hide();
782-
} else {
783-
const dynamicIdle = FC.ADVANCED_TUNING.idleMinRpm * 100;
784-
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled', { dynamicIdle }));
785-
}
786-
} else {
787-
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercent'));
776+
$('div.digitalIdlePercent').hide();
788777
}
789778

790779
$('.escSensor').toggle(protocolConfigured && digitalProtocol);

src/tabs/motors.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@
107107
<div class="numberspacer">
108108
<input type="number" name="digitalIdlePercent" min="0.00" max="20.00" step="0.01"/>
109109
</div>
110-
<span class="digitalIdlePercentDisabled"></span>
111-
<div class="helpicon cf_tip" i18n_title="configurationDigitalIdlePercentHelp"></div>
110+
<span i18n="configurationDigitalIdlePercent"></span>
112111
</label>
112+
<div class="helpicon cf_tip" i18n_title="configurationDigitalIdlePercentHelp"></div>
113113
</div>
114114
<div class="number minthrottle">
115115
<label>

0 commit comments

Comments
 (0)