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

Deprecate minthrottle to use motor_idle #4196

Merged
merged 9 commits into from
Oct 8, 2024

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Oct 1, 2024

@haslinghuis haslinghuis added this to the 11.0 milestone Oct 1, 2024
@haslinghuis haslinghuis self-assigned this Oct 1, 2024
Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for origin-betaflight-app ready!

Name Link
🔨 Latest commit ea5dd65
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-app/deploys/6705529607f72700081bfce4
😎 Deploy Preview https://deploy-preview-4196.dev.app.betaflight.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@haslinghuis haslinghuis force-pushed the refactor-motor-idle branch 2 times, most recently from dc1aa01 to bc109ea Compare October 4, 2024 16:02
@haslinghuis haslinghuis changed the title Depricate minthrottle Depricate minthrottle to use motor_idle Oct 4, 2024
@nerdCopter
Copy link
Member

when MULTISHOT, PWM, PROSHOT, i don't see minThrottle and do see maxThrottle, minCommand
image

@haslinghuis
Copy link
Member Author

Correct minthrottle is no longer used in firmware (when merged).

@nerdCopter
Copy link
Member

and successfully backwards compatible for <=4.5
image

Copy link
Member

@nerdCopter nerdCopter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • approving for workflow dependent upon firmware PR

"message": "Motor Idle (%)"
},
"configurationDigitalIdlePercentHelp": {
"configurationmotorIdleHelp": {
"message": "The Motor Idle value sets the idle speed of the motors when throttle is at minimum position.<br/><br/><strong>Dynamic Idle disabled</strong><br/><br/>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.<br/><br/>Too low: the motors may not start up reliably, or desync at the end of a flip or roll or on hard throttle chops.<br/><br/>Too high: the craft may feel 'floaty'.<br/><br/><strong>Dynamic idle enabled</strong><br/><br/>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.<br/><br/>Too low: the motors may not start up reliably.<br/><br/>Too high: the craft may shake on the ground before takeoff."
},
Copy link
Member

@ctzsnooze ctzsnooze Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe
The Motor Idle value sets the idle speed of the motors when throttle is 'low' (i.e, when the throttle setpoint is below min_check).
If Dynamic Idle is not enabled, the value sent to the motors will be 'min_command' plus the Motor Idle percentage, for both PWM and DShot ESCs.
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'. < no changes for these two lines>

If Dynamic Idle is enabled, the motor drive value cannot exceed the Motor Idle percentage above 'min_command', before takeoff. If, on arming, the motors do not start up reliably, increase the Motor Idle value to send a higher initial startup value. Once they start spinning, Dynamic idle will attempt to attain the set minimum RPM. Note that, before takeoff the RPM at idle may be below the configured dyn_idle_min_rpm value. So long as the motors start up reliably, this is OK. To check that your configured dyn_idle_min_rpm value will be achieved in flight, raise throttle above the 'air mode_start_throttle' value, which overcomes the Motor Idle limit. If Dynamic Idle is enabled and the Motor Idle is set too high, the craft may shake on the ground before takeoff.

Sorry for so many words !

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the longest tooltip 😛

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK let's try something shorter :-)

Sets the idle speed of the motors while armed and throttle is 'low' (below `min_check`).
**Dynamic Idle not enabled:**
Each motor gets `min_command` plus Motor Idle percent.
Idle too low: motors may not start reliably, spin up slowly, or desync in flips or rolls.
Idle too high: the craft may feel 'floaty'.
Note: analog ESC's must be calibrated so the motors start just above `min_command`.
**Dynamic Idle enabled**
On arming, the 'normal' idle value is sent to each motor, until they spin up.
Once spinning, the motor signal is adjusted to achieve the target RPM.
Before takeoff, the motor signal is limited to the Motor Idle percentage, and the set RPM may not be achieved.  This is OK.  When throttle is raised above the `airmode_motor_start_throttle` percentage, the limit is much higher, and the set RPM should be achieved at idle.
Idle too low: motors may not start reliably
Idle too high: shaking before takeoff (only if dynamic idle is also high)
Note: Dynamic Idle requires DShot and DShot Telemetry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the tooltips to be wider :-)
Either that, or the tooltip is responsive to the state of Dynamic idle, and only shows the text for 'not enabled' when it is 'not enabled', and vice versa.
This is perhaps the best solution.

@ctzsnooze
Copy link
Member

@haslinghuis thanks for this work - I can confirm @nerdCopter's test results for 4.6, where selecting an analog protocol still shows minThrottle, where it should show the same MotorIdle value as we see with DShot:

Screen Shot 2024-10-05 at 11 02 57 am

@haslinghuis
Copy link
Member Author

On 4.6 we have:

image

On 4.5 we have

image

@ctzsnooze
Copy link
Member

ctzsnooze commented Oct 5, 2024

Approving - motor idle renders as it should in 4.6! Thank you!

Let's see how it works if the message text us sensitive to the dynamic idle state, that should halve the message length, making it small enough.

Maybe these tooltips can auto-size themselves a bit wider for computer screens?

@haslinghuis
Copy link
Member Author

  • Have tried two messages, it updates in dev console, but does not update GUI (like done in other places).
  • Using wide tip we get:
    image

@ctzsnooze ctzsnooze changed the title Depricate minthrottle to use motor_idle Deprecate minthrottle to use motor_idle Oct 6, 2024
@ctzsnooze
Copy link
Member

ctzsnooze commented Oct 6, 2024

Wide tip looks good! Maybe update the text with the shorter version that I provided? Should be good to go once the firmware is merged.

@haslinghuis
Copy link
Member Author

haslinghuis commented Oct 6, 2024

image

@ctzsnooze
Copy link
Member

@haslinghuis - while we are thinking about this, my personal view is that the user doesn't need two decimal points of accuracy in the idle percentage, even though we provide it with the 16 bit value in the CLI.
Maybe we can in Configurator only provide 1 decimal point of adjustment? ie 5.1, 5.2 etc steps, not 5.10, 5.11, 5.12, when using the up and down arrows?

Copy link

sonarqubecloud bot commented Oct 8, 2024

@haslinghuis haslinghuis merged commit 922adbe into betaflight:master Oct 8, 2024
8 checks passed
@haslinghuis haslinghuis deleted the refactor-motor-idle branch October 8, 2024 16:31
demvlad pushed a commit to demvlad/betaflight-configurator that referenced this pull request Nov 14, 2024
* Depricate minthrottle

* Fix sonar

* Update toggle hide logic

* Rename digitalIdlePercent

* Move mincommand above maxthrottle

* Use widetip

* Update tooltip

* Change precision

* Fix camelCase
OGCJM11 pushed a commit to OGCJM11/betaflight-configurator that referenced this pull request Dec 28, 2024
* Depricate minthrottle

* Fix sonar

* Update toggle hide logic

* Rename digitalIdlePercent

* Move mincommand above maxthrottle

* Use widetip

* Update tooltip

* Change precision

* Fix camelCase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants