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

Plane: Manual: use apply_throttle_limits function in manual mode if IDLE_GOV_MANUAL is enabled. #26283

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Feb 21, 2024

This moves the application of throttle limits to the main apply_throttle_limits function that all other modes used here:

float Plane::apply_throttle_limits(float throttle_in)

This makes manual mode behave the same as any other mode. This does result in a couple of changes in behavior:

  • THR_MAX is also applied along with THR_MIN.
  • Battery compensation is done if enabled.
  • Watt limiting is done if enabled.

@tridge
Copy link
Contributor

tridge commented Feb 26, 2024

need CI test that in MANUAL we can go below THR_MIN to allow engine kill
also check when disarm we go to SERVOn_MIN
and check we do follow THR_MIN in FBWA when armed

@IamPete1
Copy link
Member Author

Added a auto test, tested the auto test by hard coding return true in the apply_throttle_limits it fails in that case and passes for this PR.

tridge
tridge previously requested changes Feb 28, 2024
Tools/autotest/arduplane.py Show resolved Hide resolved
@tridge tridge removed the DevCallEU label Feb 28, 2024
Tools/autotest/arduplane.py Outdated Show resolved Hide resolved
servo_min = self.get_parameter("RC3_MIN")
servo_max = self.get_parameter("RC3_MAX")
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a get_parameters, but use is not mandatory :-)

@IamPete1 IamPete1 dismissed tridge’s stale review February 28, 2024 13:44

drain_mav() added to autotest after mode/arming changes.

@IamPete1 IamPete1 requested a review from tridge February 28, 2024 13:44
@tridge tridge merged commit 4a310fb into ArduPilot:master Mar 5, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants