Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.

Commit 5c1c50f

Browse files
authored
Merge pull request #8 from stronnag/update_set_baud_rate
Update set baud rate
2 parents c4216e0 + 0531395 commit 5c1c50f

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

LTM/config.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ S.onlyTracker = false
3131
-- S.LOGGER = true
3232

3333
-- 2.3.12 and later
34-
S.baudrate = 115200
34+
-- if set to 0 (or less!) then the baud rate will not be changed
35+
S.baudrate = 0
3536

3637
return S

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Introduction
44

5-
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](https://github.com/iNavFlight/inav) as the telemetry provider.
5+
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](https://github.com/iNavFlight/inav) as the telemetry provider.
66

77
Typical use case:
88

99
* Radiomaster TX16S radio (which has two normal / not inverted UARTS)
1010
* Bluetooth module attached to a radio UART
11-
* LTM aware ground station [mwp](https://github.com/stronnag/mwptools), ezgui, "mission planner for inav"
11+
* LTM aware ground station [mwp](https://github.com/stronnag/mwptools), ezgui, "mission planner for inav" or
1212
* Antenna tracker that uses LTM.
1313

1414
## Installation and Usage
@@ -36,19 +36,21 @@ Note that:
3636
* OpenTX 2.3.9, a bug causes no power to be supplied to the TX16S UARTS; this is fixed in the 2.3.10 nightlies.
3737
* OpenTX 2.3.10, a bug causes the Crossfire Flight Mode not to be set.
3838
* OpenTX 2.3.11, the baud rate is set incorrectly for LUA ports, rendering the data unreadable.
39-
* EdgeTX 2.7.0 and (2.8-dev of early May 2022) cannot set the serial baud rate to other than the default of 115200.
39+
* EdgeTX 2.7.1 and (2.8-dev of early May 2022) cannot set the LUA serial baud rate to other than the default of 115200.
4040
* The telemetry provider must be INAV for some status related fields.
4141

4242
No known issues with
4343
* OpenTx 2.3.14
44-
* EdgeTX (2.5.0 and later)
44+
* EdgeTX (other than setting baud rate)
4545

4646
## Configuration
4747

4848
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.
4949

5050
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.
5151

52+
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).
53+
5254
## Audio
5355

5456
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.
@@ -61,12 +63,12 @@ In the simulator human readable debug messages are generated unconditionally.
6163

6264
## Caveats
6365

64-
Tested on a Radiomaster TX16S with OpenTX 2.3.9 (and 2.3.10 nightlies), internal module.
65-
Requires smartport (e.g. Frsky D16) compatible RX on the aircraft, and EdgeTX.
66+
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).
67+
Requires Smartport or CRSF compatible RX on the aircraft.
6668

67-
The scripts have also been tested using Crossfire with Taranis x9D+se, OpenTX 2.3 +luac, full Crossfire TX, Nano RX and the [u360gts antenna tracker](https://github.com/raul-ortega/u360gts).
69+
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](https://github.com/raul-ortega/u360gts).
6870

69-
Other OpenTX compatible radios and other RX radio systems (e.g. R9) are NOT tested and as I don't have such hardware, may not work.
71+
Other OpenTX/EdgeTX compatible radios and other RX radio systems (e.g. R9) are NOT tested and as I don't have such hardware.
7072

7173
## Copyright and Licence
7274

ltm.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ local function init()
348348
S = loadScript("/SCRIPTS/FUNCTIONS/LTM/config.lua")()
349349
dolog("Tracker only " .. string.format("%s",S.onlyTracker))
350350
if rmaj >= 2 and rmin >= 3 and rrev >= 12 then
351-
if S.baudrate ~= 115200 then
351+
if S.baudrate > 0 then
352352
setSerialBaudrate(S.baudrate)
353353
end
354354
end

0 commit comments

Comments
 (0)