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

AP_Scripting: added fixed wing boost motor example #22585

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Jan 4, 2023

This is for aircraft using an ICE fwd engine with an electric boost motor

allow for extra motor to be used when at high throttle
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Not checking safety switch state. And probably several other ways we usually stop motors turning (throttle suppression? eSTOP?).

That might be OK, but we should definitely call it out in a comment!

libraries/AP_Scripting/examples/fw_boost_throttle.lua Outdated Show resolved Hide resolved
@tridge
Copy link
Contributor Author

tridge commented Jan 5, 2023

Not checking safety switch state. And probably several other ways we usually stop motors turning (throttle suppression? eSTOP?).

safety switch will still work, doesn't need special handling as it impacts all outputs other than masked ones. Adding any check for it would be incorrect

@IamPete1
Copy link
Member

IamPete1 commented Jan 5, 2023

I would hard code this to use one of the "motor" output functions. boost_throttle would be ideal. The advantage of using a "motor" function rather than a scripting one is that E stop will still work. Possibly the intent was to use such a function in anycase?

@tridge
Copy link
Contributor Author

tridge commented Jan 7, 2023

I would hard code this to use one of the "motor" output functions. boost_throttle would be ideal

we can't use k_boost_throttle as AP_MotorsMulticopter already outputs to it

The advantage of using a "motor" function rather than a scripting one is that E stop will still work.

E-stop is extremely rare on quadplanes (I can't recall seeing a log with it enabled)

@tridge
Copy link
Contributor Author

tridge commented Jan 11, 2023

we need to add a k_ThrottleRaw which is the throttle before the ICE override, so that when the ICE engine dies we don't kill the booster. When using k_throttle the booster would stop as the ICE engine would go into re-start, which drops the throttle that the booster uses in this script

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

Successfully merging this pull request may close these issues.

4 participants