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

Show idleMinRpm on motor tab (active profile) #3625

Merged
merged 4 commits into from
Nov 10, 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
4 changes: 4 additions & 0 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,10 @@
"message": "The pole count is the number of magnets on the bell of the motor. Do NOT count the stators where the windings are located. 5\" motors usually have 14 magnets, 3\" or smaller often have 12 magnets.",
"description": "Help text for the Motor poles field of the ESC/Motor configuration"
},
"configurationMotorIdleRpmHelp" : {
"message": "This is the dynamic idle value from the active PID profile. When Dynamic Idle is set to zero, only static motor idle will apply. Change the Dynamic Idle settings on the PID tuning tab.",
"description": "Help text for dynamic idle setting"
},
"configurationThrottleMinimum": {
"message": "Minimum Throttle (Lowest ESC value when armed)"
},
Expand Down
6 changes: 6 additions & 0 deletions src/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ input[type="number"] {
margin-left: 5px;
}
}
.noarrows {
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
}
.clear-both {
clear: both;
}
Expand Down
4 changes: 4 additions & 0 deletions src/js/tabs/motors.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ motors.initialize = async function (callback) {
dshotBidir: FC.MOTOR_CONFIG.use_dshot_telemetry,
motorPoles: FC.MOTOR_CONFIG.motor_poles,
digitalIdlePercent: FC.PID_ADVANCED_CONFIG.digitalIdlePercent,
idleMinRpm: FC.ADVANCED_TUNING.idleMinRpm,
_3ddeadbandlow: FC.MOTOR_3D_CONFIG.deadband3d_low,
_3ddeadbandhigh: FC.MOTOR_3D_CONFIG.deadband3d_high,
_3dneutral: FC.MOTOR_3D_CONFIG.neutral,
Expand Down Expand Up @@ -693,6 +694,8 @@ 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="idleMinRpm"]').val(FC.ADVANCED_TUNING.idleMinRpm);

if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) {
dshotBidirElement.prop('checked', FC.MOTOR_CONFIG.use_dshot_telemetry).trigger("change");

Expand Down Expand Up @@ -771,6 +774,7 @@ motors.initialize = async function (callback) {
divUnsyncedPWMFreq.toggle(protocolConfigured && !digitalProtocol);

$('div.digitalIdlePercent').toggle(protocolConfigured && digitalProtocol);
$('div.idleMinRpm').toggle(protocolConfigured && digitalProtocol && FC.MOTOR_CONFIG.use_dshot_telemetry);

if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) {
$('div.digitalIdlePercent').hide();
Expand Down
9 changes: 9 additions & 0 deletions src/tabs/motors.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@
</label>
<div class="helpicon cf_tip" i18n_title="configurationMotorPolesHelp"></div>
</div>
<div class="number idleMinRpm">
<label>
<div class="numberspacer noarrows">
<input type="number" name="idleMinRpm" min="0" max="100" step="1" readonly/>
</div>
<span i18n="pidTuningIdleMinRpm"></span>
</label>
<div class="helpicon cf_tip" i18n_title="configurationMotorIdleRpmHelp"></div>
</div>
<div class="number digitalIdlePercent">
<label>
<div class="numberspacer">
Expand Down