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: add Lua bindings to check VTOL approach and land phases #27531

Closed
wants to merge 2 commits into from

Conversation

CallanDaniel
Copy link
Contributor

This PR adds Lua bindings for the follwing functions from quadplane.h :

  • in_vtol_land_approach()
  • in_vtol_land_final()
  • in_vtol_land_sequence()
  • in_vtol_land_poscontrol()
  • in_vtol_airbrake()

It also makes the functions public in order to expose them to Lua scritping.

Tested in SITL with the example script running:

Screenshot 2024-07-11 114433

added lua bindings as well as example script to check if we are in the VTOL approach and landing phases
Made the functions that check if we are in VTOL approach or landing phase public to expose to Lua scripting
@CallanDaniel
Copy link
Contributor Author

CallanDaniel commented Jul 12, 2024

@Hwurzburg @IamPete1 I added the empty line, but it seems to dissapear when I commit. Appologies for the confusion, still learning.
image

@IamPete1
Copy link
Member

@Hwurzburg @IamPete1 I added the empty line, but it seems to dissapear when I commit. Appologies for the confusion, still learning.

It could be VS Code or git itself, sometimes it will not let you commit pure whitespace changes.

@tpwrules
Copy link
Contributor

tpwrules commented Jul 13, 2024

Bindings are kind of expensive, would it be reasonable to instead have an enum and one public function which checks and returns a specific property?

@CallanDaniel
Copy link
Contributor Author

@tpwrules I don't see why not, this had actually crossed my mind when I was writing the example script. I'll do that. Thanks for the feedback!

@CallanDaniel
Copy link
Contributor Author

CallanDaniel commented Jul 14, 2024

@tpwrules something like this? Yet to do the bindings and a new example script - just wanted to check I'm going in the right direction. EDIT: nevermind - I need a couple days here

@CallanDaniel CallanDaniel marked this pull request as draft July 14, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants