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
Implement new functions in lua script #5188
Comments
@jujuducoin why did you close this? Are you still interested? I can write a small howto. |
I closed because it is not really an issue ^^ |
First I would encourage you to discuss your ideas for new functions before actually implementing them. This will give you a broader view and much more chance of you final code being included in the official OpenTX. You can talk to us on https://opentx.rocket.chat/channel/OpenTX_General Now to the implementation: Each Lua API function is:
Lets take your example `crossfireTelemetryPop()'. The function belongs to the general part of OpenTX API and is defined in opentx/radio/src/lua/api_general.cpp Line 1201 in 5b5c88f
As you can see the C function is named opentx/radio/src/lua/api_general.cpp Line 411 in 5b5c88f
How the function itself is implemented:
You can read more at https://www.lua.org/pil/26.1.html |
For the moment I'm just trying but after that why not to purpose some changes |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello I'm new in openTX (I've not received my horus yet, bought today)
I would like to know the clean way to create my own cpp functions in order to use it in lua scripts.
So which file(s) I have to modify ?
In fact I would like to add functionalities to lua scripts, for example how did you add function crossfireTelemetryPop() in openTX firmware / lua language ?
Thank you ! :)
The text was updated successfully, but these errors were encountered: