stronnag / LTM-lua

inav LTM telemetry from EdgeTX / OpenTX radio
GNU General Public License v3.0
27 stars 2 forks source link
ltm lua

LTM-lua

Introduction

This project provides an OpenTX LUA script that outputs LTM (INAV'S Lightweight Tememetry) on a serial port on an OpenTX / EdgeTX radio. It is designed to work with INAV as the telemetry provider.

Typical use case:

Installation and Usage

Note that any Zip files in the release area will profile this directory structure.

The script may be invoked either on an external stimulus e.g. Telemetry or on a switch. See the OpenTX / TX vendor documentation for details on configuring your radio.

Note that the UARTs on the TX16S default to 115200 bps, so set BT devices accordingly.

Note that:

No known issues with

Configuration

There are a few user editable settings in the file LTM/config.lua; currently the user must edit this file directly as no radio UI is provdied.

In particular, the onlyTracker setting may be used to provide only GPS data for antenna trackers. See the comments in LTM/config.lua for details.

The S.baudrate setting may be used to set the baud rate; if S.baudrate is 0, then the device baud rate is unchanged, otherwise the specified baud rate is set. The default value is 0 (i.e. use radio setting).

Audio

The audio directory contains two synthesised voice files, ltmon.wav and ltmoff.wav that may be placed in SOUNDS/en and used to provide audible indications (via Special Functions) that LTM forwarding is enabled / disabled.

Logging

If the variable LOGGER is set to true, LTM binary messages written to a LOG/ file (simulator and radio). It is not advised to do this on the radio.

In the simulator human readable debug messages are generated unconditionally.

Caveats

Last tested successfully on a Radiomaster TX16S with OpenTX 2.3.15 and EdgeTX 2.7.1 and the internal module, FrSky D16 compatible RX (May 2022). Requires Smartport or CRSF compatible RX on the aircraft.

The scripts have also been tested by others using Crossfire with Taranis x9D+se, OpenTX 2.3 +luac, full Crossfire TX, Nano RX and the u360gts antenna tracker.

Other OpenTX/EdgeTX compatible radios and other RX radio systems (e.g. R9) are NOT tested and as I don't have such hardware.

Copyright and Licence

(c) Jonathan Hudson 2020-2022

GPL Version 3 or later.