-
Notifications
You must be signed in to change notification settings - Fork 18k
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
RC_Channel: TECS propulsion failure aux func #25644
Conversation
a272071
to
980bf36
Compare
Allows the user to set a switch to tell the TECS that propulsion has failed. This also allows a safer avenue for a lua script to flag this, instead of directly setting the speed weight parameter.
Allows the user to set a switch to tell the TECS that propulsion has failed. This also allows a safer avenue for a lua script to flag this, instead of directly setting the speed weight parameter.
Allows the user to set a switch to tell the TECS that propulsion has failed. This also allows a safer avenue for a lua script to flag this, instead of directly setting the speed weight parameter.
980bf36
to
7ea6474
Compare
I've rebased this on master as it conflicted horribly. @robertlong13 could you give this another test, please? There's no autotest included here, and I'm not sure what testing you did on this initially... |
I've tested in RealFlight on an ALTI Transition. Killed the engine, then triggered the aux function 5s later. It glides like it should. Onboard log: 00000003.zip |
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 a rebase again, but this change looks good.
However, it is abit concerning that we have a set_propulsion_failed_flag
in TECS which is unused until now, so is completely untested. At least it looks to do the same thing as set_gliding_requested_flag
which is used by soaring. I wonder if we would be better to remove the set_propulsion_failed_flag
and use set_gliding_requested_flag
for both.
needs a rebase and an autotest, thanks! |
@@ -8,6 +8,10 @@ | |||
-- If the aircraft drops below a predetermined minimum altitude, QLAND mode is engaged and the aircraft lands at its current position. | |||
-- If the aircraft arrives within Q_FW_LND_APR_RAD of the return point before dropping below the minimum altitude, it should loiter down to the minimum altitude before switching to QRTL and landing. | |||
|
|||
-- constants | |||
local RC_OPTION = {TECS_PROP_FAILED=177} |
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.
Isn't this 178?
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.
Oof, great catch. This was missed in the rebase.
While working on the autotest for this, I dug a little deeper and learned that this is identical to having a lua script set |
Allows the user to set a switch to tell the TECS that propulsion has failed, causing it to switch to gliding control. I often set my aux functions tab up in Planner for a variety of emergency actions like this, and this would allow me a much easier way to handle engine-outs.
This PR also allows a much better avenue for a lua script to automatically flag that propulsion has failed, as opposed to directly setting the speed weight parameter. In addition to setting the speed weight, this flag prevents the TECS from setting "bad descent" and lowering the airspeed to a minimum, which probably is not the best speed for optimal glide.