Lua Scripts - rotorflight/rotorflight GitHub Wiki

Introduction

You can adjust a variety of settings using only your transmitter with the Rotorflight Lua scripts. They allow you to change things like PIDs, rates, filters, failsafe and governed headspeed on the field. Prerequisites:

  • OpenTX 2.3.12 or EdgeTX 2.5.0 or newer on the transmitter and
  • a FrSky Smartport or F.Port receiver
  • or a Crossfire v2.11 or newer receiver
  • or an ELRS 2.0.1 or newer receiver.

Examples:

  • TX16S with a FrSky X4R using the FrSkyX2 protocol.
  • Taranis X9D with a TBS Crossfire TX/RX module.
  • Taranis QX7 and a FrSky R-XSR, using the FrSky D16 protocol (as long as you don't use the ACCST D16 2.1.1 LBT firmware on the R-XSR, because this firmware has telemetry bugs).
  • TX16S with an ELRS 2.0.1 module and receiver.

If you're not using F.Port, start up the Rotorflight Configurator, go to the Configuration tab and enable the TELEMETRY feature. F.Port telemetry does work without enabling this feature.

If telemetry is working properly on your system, the Lua scripts should work as well.

Installation

Download the latest release and copy the contents of the SCRIPTS folder to your transmitter. See also the readme.

Usage

On your transmitter, go to the Tools menu of your transmitter and select Rotorflight conf.

Tools

The first time you do this all scripts will be compiled and the Tools menu will be displayed again. Select Rotorflight conf again. Now the script will wait for a connection with the receiver.

connection

Power up the receiver. The script will retrieve the API version used by Rotorflight and the device ID of the flight controller. After this you will see the main menu.

main menu

Here you can select what you want to change. For example, select PIDs.

pids

Now you can change the values of your PIDs. If you want to save your changes, long press the wheel/roller. The Page menu should now pop up. Select Save page to send your changes to the flight controller. Or press Exit to exit the Page menu.

page menu

There's quite a lot of settings you can adjust on the field. Here's an overview of all the pages:

pages

Feel free to have a look at any page. As long as you don't select Save page, nothing will be changed.