Need Help with Lua Script and Sending MAVLink Commands in ArduPilot

Hello ArduPilot community,

I’m currently working on a Lua script for ArduPilot and I need some help understanding how to send MAVLink commands directly from the script.I want to clear the logs on the autopilot directly. Is there a way to do this without using a MAVLink command? If so, could someone explain how to achieve this within a Lua script?

I’ve looked through the available documentation, but there doesn’t seem to be a lot of examples that explain how to send MAVLink commands from Lua scripts directly on the autopilot.

Thank you in advance for any help!