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

Include scale in getInput and insertInput #3772

Merged
merged 2 commits into from
Aug 26, 2023

Conversation

pguillory
Copy link
Contributor

When using telemetry as an input, the scale field is used to convert from a value with units (like volts or meters) to a percentage. I'd like to modify an input's scale via Lua script. However this field does not seem to be supported by the Lua API. This seems like an oversight, so I added it.

Summary of changes:
Modify model.getInput and model.insertInput API to add the "scale" field.

When using telemetry as an input, the scale field is used to convert from a
value with units (like volts or meters) to a percentage. I'd like to modify an
input's scale via Lua script. However this field does not seem to be supported
by the Lua API. This seems like an oversight, so I added it.
@pfeerick pfeerick added the lua-api Lua API related label Jul 7, 2023
@raphaelcoeffic
Copy link
Member

@pguillory please add the new field to the documentation / comments before the functions.

@pfeerick pfeerick added this to the 2.10 milestone Aug 26, 2023
@pfeerick pfeerick merged commit d8cfa67 into EdgeTX:main Aug 26, 2023
36 checks passed
3djc pushed a commit that referenced this pull request Sep 1, 2023
* Include scale in getInput and insertInput

When using telemetry as an input, the scale field is used to convert from a
value with units (like volts or meters) to a percentage. I'd like to modify an
input's scale via Lua script. However this field does not seem to be supported
by the Lua API. This seems like an oversight, so I added it.

* chore: Add scale luadoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lua-api Lua API related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants