-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Implement ESC Minimum RPM Check Before Takeoff #27696
base: master
Are you sure you want to change the base?
Conversation
@WickedShell and @magicrub have had ideas on this sort of thing before. ... and it's @andyp1per 's code we're co-opting |
thanks for this, I'm not sure that architecturally we should be putting this down in the motors library. This check depends on other subsystems so I think it naturally belongs higher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this common code should go in AP_Vehicle?
ArduPlane/quadplane.cpp
Outdated
@@ -1926,6 +1941,10 @@ void QuadPlane::update_throttle_hover() | |||
*/ | |||
void QuadPlane::motors_output(bool run_rate_controller) | |||
{ | |||
#if HAL_WITH_ESC_TELEM | |||
motors->takeoff_check(takeoff_rpm_min, takeoff_rpm_max, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the land_complete false is a problem, and means this doesn't work at all.
We need this to only impact automatic takeoff, not manual takeoff or a back transition. If we lose RPM monitoring on a motor we must not fail to spool up on back transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use in_vtol_takeoff()
6f79a06
to
47557b6
Compare
47557b6
to
6ce7d5a
Compare
// @Description: Takeoff is not permitted until motors report at least this RPM. Set to zero to disable check | ||
// @Range: 0 10000 | ||
// @User: Standard | ||
AP_GROUPINFO("TKOFF_RPM_MIN", 39, QuadPlane, takeoff_rpm_min, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a blank line between params helps readability
@@ -612,6 +612,11 @@ class QuadPlane | |||
// AHRS alt for land abort and package place, meters | |||
float land_descend_start_alt; | |||
|
|||
// support for blocking takeoff until RPMs reach parameter-defined | |||
// minimum levels: | |||
AP_Float takeoff_rpm_min; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are AP_Int16 in copter, we should make them the same type in plane
@@ -612,6 +612,11 @@ class QuadPlane | |||
// AHRS alt for land abort and package place, meters | |||
float land_descend_start_alt; | |||
|
|||
// support for blocking takeoff until RPMs reach parameter-defined | |||
// minimum levels: | |||
AP_Float takeoff_rpm_min; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs #if HAL_WITH_ESC_TELEM around these
@@ -1926,6 +1941,11 @@ void QuadPlane::update_throttle_hover() | |||
*/ | |||
void QuadPlane::motors_output(bool run_rate_controller) | |||
{ | |||
#if HAL_WITH_ESC_TELEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much rather have this in QuadPlane::takeoff_controller(), and operate just like the existing check for tiltrotor.fully_up()
I don't think it should apply to manually piloted takeoffs
I don't think we should be calling set_spoolup_block() at all in quadplanes, we can just delay takeoff, and print a message as to why it is delayed
This PR introduces a code implementation to perform an ESC minimum RPM check before takeoff. The purpose of this check is to ensure that motors are properly spooling before takeoff, leveraging ESC telemetry when available. This aims to prevent flights with undetected motor failures.
Initially, I considered integrating this check with a Pre-ARM check (#26832), but it was highlighted that a similar method already exists in Copter (#21499).
With assistance from @peterbarker found a different method to generalise the check into AP_motors.
This code is still a work in progress and needs further discussion during dev call if this is the right approach.