Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify motor idle config #3573

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1349,11 +1349,8 @@
"configurationDigitalIdlePercent": {
"message": "Motor Idle ( %, static)"
},
"configurationDigitalIdlePercentDisabled": {
"message": "Dynamic Idle is active at {{dynamicIdle}} rpm. See the PID tuning tab."
},
"configurationDigitalIdlePercentHelp": {
"message": "The 'Motor Idle (static)' 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. <br><br>Increase it to gain more idle speed and avoid desyncs. Too high and the craft feels floaty. Too low and the motors can desync or be slow to start up.<br><br>In 4.3, when Dynamic Idle is active, the static idle value is disregarded, because the idle value is continually adjusted to maintain the configured minimum rpm on the slowest motor."
"message": "The 'Motor Idle (static)' 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. <br><br>Increase it to gain more idle speed and avoid desyncs. Too high and the craft feels floaty. Too low and the motors can desync or be slow to start up."
},
"configurationMotorPoles": {
"message": "Motor poles",
Expand Down Expand Up @@ -4535,7 +4532,7 @@
"message": "Dynamic Idle Value [* 100 RPM]"
},
"pidTuningIdleMinRpmHelp": {
"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. For 4.2, set the DShot idle value low, eg 1%. There is no need to adjust the DShot Idle value in 4.3. <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."
"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."
},
"pidTuningIdleMinRpmDisabled": {
"message": "Dynamic Idle is OFF because Dshot Telemetry is OFF"
Expand Down
10 changes: 7 additions & 3 deletions src/js/tabs/motors.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import FC from "../fc";
import MSP from "../msp";
import { mixerList } from "../model";
import MSPCodes from "../msp/MSPCodes";
import { API_VERSION_1_42, API_VERSION_1_44 } from "../data_storage";
import { API_VERSION_1_42, API_VERSION_1_44, API_VERSION_1_46 } from "../data_storage";
import EscProtocols from "../utils/EscProtocols";
import { updateTabList } from "../utils/updateTabList";
import { isInt, getMixerImageSrc } from "../utils/common";
Expand Down Expand Up @@ -777,8 +777,12 @@ motors.initialize = async function (callback) {
}

if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) {
const dynamicIdle = FC.ADVANCED_TUNING.idleMinRpm * 100;
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled', { dynamicIdle }));
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
$('div.digitalIdlePercent').hide();
} else {
const dynamicIdle = FC.ADVANCED_TUNING.idleMinRpm * 100;
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercentDisabled', { dynamicIdle }));
}
} else {
$('span.digitalIdlePercentDisabled').text(i18n.getMessage('configurationDigitalIdlePercent'));
}
Expand Down