Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Betaflight OpenTX LUA script not working
#1
Question 
Hi everyone!

I have a problem with the OpenTX LUA script to configure Betaflight settings. I feel like I have everything right, but the LUA script doesn't work for me and it always freezes in initialization state.

I'm on OpenTX 2.3.13 in TX16S, Betaflight LUA 1.5.0, ExpressLRS HM EP1 receiver, Zeus F722 Mini FC and DJI Vista VTx. This configuration works great, including telemetry, I have flown with it for many hours.

And now how does the LUA script behave:
After turning on the transmitter and connecting the battery to the ESC, everything works as it should, in a moment I have all the telemetry data on the transmitter from the amount of current, through RQLY to GPS coordinates.
After activating the LUA script, nothing happens other than that Initializing ... appears on the display and this state freezes. In a few tens of seconds, the individual sensors are gradually lost until all telemetry is lost. Subsequently, the connection with Rx fails. In order to control the drone, I have to restart everything, including the transmitter.

Does anyone have a similar experience? I followed the instructions, but have no luck. Thanks for advice.
Momo
Reply
Login to remove this ad | Register Here
#2
I don't have ELRS yet to give you any solid advice but have you read the following ELRS WIKI (MSP section): https://github-wiki-see.page/m/ExpressLR...ight-Setup

Quote:MSP
To configure betaflight from your transmitter it's possible to use the betaflight lua scripts. This requires the telemetry feature enabled for the RX+TX. If the telemetry page of OpenTx does not show regular updates for all sensors the LUA script will also not work.

Mavlink is not supported and currently not planed to be added.

To get a responsive UI configure ExpressLRS for fast data transfer so make sure to use something like 200Hz/250Hz with 1:2 tlm and a serial baud rate of 400000. The initial VTX tables download does take long - but is cached after that.

If you get a "retrying" message while saving changes it means that the lua script did not receive a response fast enough. But the change usually still goes through so try reloading the page to check if the change was saved. With the recommended settings this does not happen but with slower settings it could happen.
[-] The following 1 user Likes kafie1980's post:
  • MomoBrut
Reply
#3
Well yeeeeee ...
Good point Kafie ... and thank you for pointing me out ...
With proper ERLS link settings it works now and this is clearly the problem of ERLS downlink setting.

For LR flights I am using this ERLS setting: 150 Hz (-112 dBm) packet rate and 1:64 (47 bps) ratio for downlink (telemetry ratio). It does not work with this setting in any case. Downlink has a very small packet rate with this setting and initialization will probably go into timeout. The smallest packet rate at which initialization takes place is a 1:16 ratio for 150 Hz, which corresponds to a data rate of 281 bps. Initialization takes place, but loading menu items is very slow with a delay of a few seconds, however it works. In order to work normally with an Betaflight LUA script without annoying delay, the bit rate must be much larger, at least 1:4 at 150 Hz, which is 1421 bps.

Thanks again
Cheers
Momo
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] betaflight 4.4 rx configuration for frsky r-xsr sim_tcr 7 2,075 18-May-2024, 07:25 PM
Last Post: SnowLeopardFPV
  Announcement Betaflight 4.5.0 *** FINAL RELEASE *** Now Available SnowLeopardFPV 4 743 08-May-2024, 02:19 PM
Last Post: SnowLeopardFPV
Exclamation Betaflight Configurator - HELP iFly4rotors 11 615 05-May-2024, 08:09 PM
Last Post: Eyes.fpv
  Announcement Betaflight 4.5.0 Release Candidate 4 Now Available SnowLeopardFPV 8 2,542 15-Apr-2024, 06:50 PM
Last Post: SnowLeopardFPV
  Betaflight Configurator Windows - Bluetooth Connection norseman73 1 239 17-Mar-2024, 02:55 PM
Last Post: SnowLeopardFPV


Login to remove this ad | Register Here