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

Jump Tags: add scripting hooks and examples #23000

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

magicrub
Copy link
Contributor

This PR extends PR #22421 and adds two scripts:

  • re-calibrate baro using rangefinder before you land
  • check wind and jump to into-wind landing direction if better

@tridge
Copy link
Contributor

tridge commented Feb 22, 2023

we will wait till 1st one merges

@magicrub
Copy link
Contributor Author

we will wait till 1st one merges

First one has merged

@magicrub
Copy link
Contributor Author

Lua changes from the merged PR #22861 is causing LUA doc warnings which is now blocking this PR.. and any other PR that has LUA bindings changes

@peterbarker
Copy link
Contributor

Lua changes from the merged PR #22861 is causing LUA doc warnings which is now blocking this PR.. and any other PR that has LUA bindings changes

No, only the ones that try to have CI run again. PRs that have already passed CI can be merged, breaking master ;-)

Not sure what the point of this comment was - there are new requirements, satisfy them?

libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
Comment on lines 1511 to 1523
-- desc
---@return number
Copy link
Contributor

Choose a reason for hiding this comment

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

Kind of sparse documentation, right? Knowing what sort of altitude is returned would be nice to have in the documentation (AMSL would be most outsider's guess, and I'm guess that that guess would be wrong).

Is there facility for more information in these documentation strings?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, just add more text on the same line. There are some that are more thoroughly documented, would be good to get them all fully documented eventually.

@magicrub magicrub force-pushed the pr/jump_tag_scripting branch 2 times, most recently from e5909ca to e8f5de7 Compare February 23, 2023 21:08
@magicrub
Copy link
Contributor Author

@peterbarker @IamPete1 I've added all the comments from the libraries into the script desc for all of Baro and Mission

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.

Looks good

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Feb 28, 2023
@@ -2091,6 +2091,18 @@ uint16_t AP_Mission::get_index_of_jump_tag(const uint16_t tag) const
return 0;
}

#if AP_SCRIPTING_ENABLED
bool AP_Mission::get_last_jump_tag(uint16_t &tag, uint16_t &age) const
Copy link
Contributor

Choose a reason for hiding this comment

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

needs a comment for units of age (the name makes it sound like a time, which is isn't)

---@return boolean
function mission:clear() end

-- desc
-- set any WP items in any order in a mavlink-ish kinda way.
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this comment mean? "mavlink-ish" ??

@tridge tridge merged commit 5498bbe into ArduPilot:master Feb 28, 2023
@magicrub magicrub deleted the pr/jump_tag_scripting branch February 28, 2023 22:34
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.

None yet

6 participants