-
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
LUA: Add a function to retrieve the landed state #27222
LUA: Add a function to retrieve the landed state #27222
Conversation
libraries/AP_Scripting/docs/docs.lua
Outdated
-- desc | ||
---@return integer | ||
function vehicle:get_landed_state() end |
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.
Full descriptions please.
You can enumerate the return states like this:
ardupilot/libraries/AP_Scripting/docs/docs.lua
Lines 1416 to 1423 in eb8eeba
-- get throttle motor output | |
---@return integer | |
---| '0' # Shut down | |
---| '1' # Ground idle | |
---| '2' # Spooling up | |
---| '3' # Throttle unlimited | |
---| '4' # Spooling down | |
function motors:get_spool_state() end |
this is a bit strange. There is already a landed_state() in GCS_MAVlink which does exactly the same, so it's a good part code duplication. Also, why should only Copter get this lua. Note that there had been this PR #25459, proposing to move em to the vehicle class, which should also adress this here. |
@olliw42 san. |
you do not need to use either to call it in lua |
e7ef92c
to
558f60c
Compare
558f60c
to
2377f04
Compare
I have implemented the process to determine the LAND state in the COPTER. |
We have Please re-open if you don't think that's the case. |
I want to get the value of LANDED_STATE to determine the landing status in LUA. I will add a method to retrieve the LANDED_STATE. This ticket is related to #27221 .
RESULT
LUA SCRIPT