Skip to content

Conversation

@greg-draganfly
Copy link

@greg-draganfly greg-draganfly commented Dec 19, 2025

Fix the "FIXME" in lua_bindings.cpp. Enable support for sending run time defined mavlink messages.

… sending arbitrary, run time defined mavlink messages

Since we can now send any mavlink message, we should also be able to request them.  Added a functions that maintain a list "hooked" messages.
Hooked message will not be automatically rejected by the autopilot, it is up to the script to acknowledge them

Added an example arbitrary message

Added an example script to send this arbitrary message and hook the message ID.

Added lua binding for hooking messages

modified mavlink_msgs.lua so that if a message object contains crc_extra, min_len, and max_len then 7 arguments are
passed to lua_mavlink_register_rx_msgid
MAV_CMD_SET_MESSAGE_INTERVAL
MAV_CMD_GET_MESSAGE_INTERVAL
MAV_CMD_REQUEST_MESSAGE

If these commands are used for a message that has been "hooked" for use by a lua script the function returns.

It is up to the script to acknowledge and stream (if appropriate) the message requested.
@greg-draganfly greg-draganfly marked this pull request as draft December 19, 2025 14:44
@greg-draganfly greg-draganfly marked this pull request as ready for review December 19, 2025 17:25
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.

1 participant