Skip to content

AP_Scripting: add binding and helper to get old params - #19891

Merged
tridge merged 1 commit into
ArduPilot:masterfrom
IamPete1:scripting_param_conversion
Feb 14, 2022
Merged

AP_Scripting: add binding and helper to get old params#19891
tridge merged 1 commit into
ArduPilot:masterfrom
IamPete1:scripting_param_conversion

Conversation

@IamPete1

Copy link
Copy Markdown
Member

Adds the ability to get params by token rather than name. This paves the way for moving functionality out of c++ and into lua by enabling param conversion.

For example to get the value of FORMAT_VERSION

old_param = Parameter()
assert(old_param:init_by_info(0, 0, 2), 'could not find param')
gcs:send_text(0, string.format("old param = %f", old_param:get()))

@tridge
tridge merged commit 918b8a1 into ArduPilot:master Feb 14, 2022
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.

3 participants