Betaflight Lua Script Updated for OpenTX 2.2.1 | NO MORE OUT OF MEMORY ERROR
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- Uncertain about what to buy? Check out THE ULTIMATE FPV SHOPPING LIST: www.fpvknowita...
If you are interested in getting a Taranis or Horus radio, I have a page dedicated to them here: www.fpvknowita...
THIS IS MY FULL TIME JOB.
Here are other ways that you can support me:
www.fpvknowita...
---
Here's updated instructions for installing the Betaflight Lua script to your OpenTX radio (Taranis X9D, QX7, Horus X10, X12). This video improves on my original one:
1. The Betaflight Lua script got easier to install, but the instructions changed so the original video doesn't work.
2. The original video didn't use the easiest way of updating the firmware.
3. The new Betaflight Lua script not working. It has an "out of memory" error when used with OpenTX 2.2.1. I'll show you how to fix that.
-- RESOURCE LINKS --
My original Lua script installation playlist, with detailed instructions for installing Companion and updating your firmware.
Part 1: • Video
Part 2: • Betaflight Taranis Lua...
Part 3: • How To Update The Tara...
However, I suggest you use the firmware flashing method shown in this video, not the one shown in that video. Still, that video will show you how to download Companion and set it up.
Impulse RC Driver Fixer: impulserc.blob...
My ui.lua file with the change to make the vTX screen first: 1drv.ms/u/s!Al...
Thankyou Joshua,
I have been following you since I bought a Taranis 9 plus SE back in August this year. Mine came with 2.2.2 and everything uploaded sweet for the LAU scripts, including the Amber sound pac. I have yet to get a build up and running but I’m working on a 220mm quad. I want to run it “slow” at first to get used to it. Getting back in the hobby after many decades of other bits of life getting in the way.
I enjoy your persistence and explanations. This digital stuff is so different to my early 26Mhz 2 channel glider of the 60s.
Keep up the fantastic how to’s and I will get onto the patron page soon.
Thanks again from NZ.
I went to bed last night defeated that I couldn't get this to work yesterday and wake up to this. Thank you
Even better! I don't need to start the script manually it's working fine holding down the page button and cycling through the telemetry screens
I pretended I was a programmer and just did the one line in the LUA to get it to come back to the same place for VTX. It worked, it worked! Thanks Joshua!
Hello from Russia, Joshua. Thank you for the instruction and for your lessons, I would not have done it without you. Thank you very much.
Thanks once again Joshua. This was difficult for me because my PC had a hard time recognizing my sd card and taranis. sometimes drives showed up but unresponsive. I only just purchased my radio second hand and it didnt come with a usb cord. I kept trying on different usb ports and tried a second usb cable that fit but still no luck. Was about to give up and tried my first cord one more time and the drives appeared, looked correct and the firmware flashed finally!! Yay!
Never would have done this without you champ, thanks heaps!
If you go to the GitHub LUA page, you can get more recent commits that allow you to change the vtx frequency by frequency, instead of messing around with bands and channels in case you know the frequency by number. And also, the long-press page to quick access menu works on my QX7 ;)
You can quickly run BF lua. Only change filename from luac to lua.
I was thinking the same thing just wasn't sure if it would actually run it or be confused because of the filename.
so does this work? that would make this video way more useful!
It does work, that's how I distribute my Lua Telemetry script for INAV
Nothing to show, just rename.
Thanks its working :)
Thanks Josh this was a quick easy video for taranis open TX. I was running 2.2.0 and forever! Just flashed it to 2.2.1 following ur video went perfect. I don't use lua but I still glad I finally put the newest FW!
Nice! I wasn’t going to watch as I’m already on 2.2.1 but didn’t realize the .luac wasn’t run from the Telemetry scripts screen! Thanks for the tip.
Eganwp it can be if you combine it instead of keep it separate from the .lua
Great episode Joshua!
My trusted 9XD gave me this out of memory error also and I started thinking the great new scripts started to stretch the capacity of the Taranis. Luckily I was wrong.
So looking forward to your ClearView goggle receiver review!
Thanks for keeping us updated, Joshua.
Can't wait for all the Crossfire stuff.
best wishes
What a legend. Kept swapping out as cards.
You can change it in the settings to always be a joystick or mass storage.
Thank you so much for this video. I thought i messed up and thats why it said out of memory error. Cant wait for the clearview and crossfire video. Keep it up.
I just rewatched your video, it works great thank you! And it is available from the first page of my picked quad holding the page button:)
Hi, thank you for your video! After flashing Taranis with LUA and LUAC ticked, you just have to delete the bf.lua file in the BF Folder, and its works perfectly. No need to launch bf.luac manually anymore before Use.
All I am going to say is Joshua Bardwell is the man!
thanks Joshua, looking forward to your crossfire nano walkthrough.
Damn! I was actually looking forward to making some in-radio games, but looks like it's allready been done :P
Currently getting memory problem Taranis x9d and Edge Tx.. Unfortunately the same hack doesn't work.. Its the ELRS Lua.. Thanks for the video 👍👍
When are those Opentx guys going to make a device were I can just plug my brain into yours. That way you can just remote in and do this for me... haha, thank you for the tech info! I'll have to watch it about 10 times to get it right though...
Thanks Joshua. Will be installing crossfire soon also, so please, document in exquisite detail as you like.... 😋
It's easy to fix in more proper way, making long press on "Page" still working. You just need to DISABLE "lua" before flashing, and only leave "luac". After flashing, set the screen back to "None", and then to "Script" again, and choose the "bf" script again (you need to be sure all the ".luac" files are there, in most recent version of script archive they are there by default). All will be OK after that, long press on "Page" will work, and no memory error - because the firmware will use "luac" files instead of "lua"...
hey josh, when you say the taranis upgrade is needed for crossfire, you mean the micro crossfire not the full blown crossfire unit. so i have been informed by the retailer
This info is a bit dated. The x9d has been shipping with support for Crossfire for a while now. However at the tune the video was made you definitely did need to upgrade for crossfire support.
If my memory is correct crossfire support was added in 2.2.0. Before that, whatever module you used, opentx didn't support crossfire at all.
Awesome I've been struggling with that memory issue all weekend now I'm going to fix it thanx jb great work!
I recently flashed my Taranis to 2.2.1 so I could use LUA scripts on my KISS setup, but I never checked luac option and I’m getting the annoying error when I try to run the scripts on occasion.
Thanks for this video, looks like I’ll be reflashing the radio tonight again.
crossfire is old news at this point, lets see that sweet sweet clearview footage/review
:)
works different on mine. lua works as it did before but lots more stuff, it is in the quick menu for me, crossfire telemetry works now as well
Works like a charm now, but i dont have to execute the lua.c file to get it to work, it just works the way it was intended by going right into my telemetry pages
I run 2.2.0 with the new lua script without a problem. Still using the betaflight short cut on the second screen. But helpfull video. Waiting for crossfire😉
Same no problems. I have 1 quad's SA connected directly to crossfire via channel 4 just fine, and my other quad has SA connected to a uart running the page shortcut.
local currentPage = #(PageFiles) is very useful!
Thank You! well done...
Apparently the developpers of openTX finally decided to allocate more memory to LUA scripts in the nightly builds which will probably be the case of OpenTX 2.2.2 and over next releases.
So your fantastic hack will be possibly not necessary in a close future BUT thanks for sharing anyway because maybe some other scripts will require this hack :)
If you install firmware with LUA and LUAC options enabled, you can already run the script through the shortcut without the memory error.
how?
Delete the .lua file and rename the .luac file .lua You're welcome!
Yeah nah :) Was still getting memory errors in recently released OpenTX 2.2.2. However, flashing as per JB's advice with noheli, lua & luac enabled seems to have done the trick.
I couldn't get it to work with 2.2.2. See my comment above.
Always an answer to my question on this channel :)
Hello All, even when running the lua via the page key the memory error is gone. No need for me to go via the USB directory to activate the Luac file... strange, but hey... it works ! Thx Josh for the top notch work youre delivering!
since I updated both the lua and luac working too ! thanks
Thanks again Josh for your help with my issues..!
Btw.: That link to #1 of the lua script videos in the description is a link to your Taranis x9D SE video! ...Hmmm...!?
Keep up the grate work JB your killing it !
Ps. More x10s pleas!!!
Thx for the video Joshua had contact with you over this!
well its about time ive never could use my lua script because after watching your first video on it,it never work for me I kept getting the full thing popping up on my x9d pluse. once again thanks for the video
Totally off subject but Is that a jacaranda tree at the end? Looks like the jacaranda's we have here in Florida. Awesome review! I'm waiting about another month to get a x9d and crossfire! I'm glad I waited until you do it!
It's a cherry.
Is this the same for Kiss V2? I assume thats what the Snake script is for? Looking forward to the next Lua video!
Joshua, thanks for this video, but what could be the reason that there is no information showing for the PID or VTX inside the lua script? It just has "--" for all the fields. I'm running a Hobbywing XROTOR F4 FC and have an X4Rsb rx with the s.port wired to UART3TX and a Tramp HV with the telemetry wired to UART6TX. I also have both turned on within Betaflight.
Thanks I just ran into the out of memory today.
Same problem with 2.2.3, THX A LOT, it works prefectly :)
What is version BF Lua your used?
JB can you do a walkthrough on EXACTLY how to take a raceflight revolt and bolt setup and flash betaflight onto it... ?
I don't think that's very likely. I don't even have a Revolt setup right now, and I am completely swamped with other stuff that I am more interested in covering, like Crossfire, battery testing, low-kv 6S build....
Simple solution to run LUAC in telemetry pages, little hack :)
1. Delete BF.LUA from BF folder on SD
2. Change name BF.LUAC to BF.LUA
and thats it, if You have BF.LUA defined in telemetry pages, now it's automatliky run LUAC witch diferent filename.
Hey JB. I found that only ticking the luac option (not lua) during the build removes the need to specifically run the bf.luac script from the taranis SD slot. Script works as before with a long press of page on the model screen. Any side effects to this approach?
Out of memory error sometimes.
Hi Joshua, thanks for all the videos, for an old bloke like me new to the hobby, they have been a great help, especially now I have a X9D Plus SE. As an aside, what is the antenna you have connected to your multi protocol module.
That's a crossfire module, with an Immortal T antenna.
Thanks, you’re right, I do learn something every day. Keep up the good work.
"Let's keep this video tight" 15min :D
Sometimes I get 'Script syntax error; telemetry protocol not supported' message. But it just sometimes. I tried to switching models and goes through all the LUA pages but cannot make it appear again. *0*
I get this too occasionally !
I was hoping you'd have the full size tx and show everyone how to connect channels 3 & 4 to a uart so you can connect to Betaflight through bluetooth.
I got the micro because it's more affordable and for people not doing long range it's more than adequate.
Joshua Bardwell Most of the guys I know who got the micro tx are selling them and getting full size module. Faster protocol is nice but when you want to get into longer range the 2W vs. 100 mW is a huge difference. Plus other features like Bluetooth. I just ordered the full size tx myself.
I'm not that interested in long range video. As long as you're using 5 GHz video I think the micro module will do fine.
Great stuff!! Works like a charm! Thanks!
Hello Joshua - a question - about 11.30 into the video you are on Betaflight OSD and “No Telemetry” is flashing. This also happens with my Taranis X9D even when the radio and receiver are connected - do you have any ideas what’s going on 🤔 many thanks Davy
Ironically I dealt with this exact same problem last night while doing all this.... Ironically though the way I solved it is because originally it didn't have the BF folder in it... So my work around was remove the BF folder.... It solved my problem without changing anything in what I had to flash to my controller.... But I am new so I'm not sure what's in the BF folder that I may want to keep I may need to reinstall that into my SD card.... And then of course update my firmware to match with the new Lua C
excellent video , always is good to learn something new :)
Really awesome, man! 😁
I have a X9D (not plus) and a QX7, both running OpenTX2.2.1. I tried lua v1.0.1 scripts on 2 quads (both with SPRF3 FC, one is a modded wizard x220 and the other a scratch build with a bangood SPRF3 clone from banggood). Both quads have telemetry working fine. But only the wizard works with lua script (initially bound to my QX7). They're now wired exactly the same (softport sport telemetry with only one cable on tx softserial 2 and both with sbus). At first I thought the problem was with de X9D, but after binding the quad that doens't work with lua to the QX7 (that has lua working perfectly with the wizard), it still doesn't work. So I reckon the problem is with the quad.
Any hints on how to try to solve it? I am at a loss... tried everything I can think of...
I don't get any memory errors. The script just can't read e.g. the pids from this particular quad, with any Tx, even the QX7 that I know works fine with the wizard.
Thanks
P.S. Oh, and I have luac enabled on both TXs, but use the "telemetry page 1" with bf lua script.
Great idea bruh I will be watching Rach minute.
Thank You
Michael King
Thankyou Joshua, You are good man!
The file to change the Lua script page order to show VTX page first is no longer available but I found a way to do it, change the line to LOCAL CURRENT PAGE = 8
What does the multimodule option do? Something to do with crsf?
Thank you for the vids and knowledge JB👍
goo.gl/9kymsC
Thanks JB.
All done and seems to work ;-)
thanx!!!!
i have troble yestoday.
now all right.
I have a Taranis x9d+ 2019 edition, and I don’t see the luac on my OpenTX companion and I’m using the latest 2.3 eopentx
They got rid of the luac option. If you enable lua, then luac is included.
@@JoshuaBardwell but should I then indeed rename the LUAC files to LUA? Just following up these instructions in OpenTX 2.3.5 with LUA enables seems to give me this "out of memory" issue.
thanks so much... the low memory thing has been annoying me for a while!!!
Let's review some crossfire stuff! Great video.
Thanks a lot Joshua
I would like to upgrade to 2.2.1 but for the Q-X7 they made it even more annoying to turn on and off. I now have to hold the power button for 2-3 sec to turn on and even longer than before to turn off. If there is a way to change this that would be great!
Thank you for the how to video. I have a question: im using a 2.1 on my X9D-plus, would you recomend to upgrade to 2.2 ?
Joshua one kanobi you’re my only hope!!
My brand new kakute v2 says that it’s not being recognized when I plug in the usb... I tried the impulse tool but it can’t even see the board :( what do I dooooo!!!
Hay Josh, I'm have this memory problem and have done everything you said to do but now I'm stuck at write firmware to radio. It's been 5 mins now and still 0% should I close it out and try again???
could you please consider doing this for the new models of transmitter and esp new lua 1.5. thanks
Hey, JB, I have a doubt. My Taranis is running 2.1.6 and I'm going to update it for the newest version (2.2.2 or whatever, I don't know). My doubt is: which method should I use? The boot loader, like in your first video, or like you did here? Or it doesn't matter? Thanks!!! 😊
Personally I would use the method of "plug in while it's off" and flash from Companion. The only reason I showed the SD-card method is because it avoids the issue with DFU drivers, which many struggle with.
@@JoshuaBardwell Nice, thanks a lot!!! 😃
For anyone getting "Syntax Error" or random lua errors... try a better SD Card. I had received a new Taranis X9D Plus and all my issues went away with a new card.
thanks as always Joshua.
I see you delete the README.TXT files from each of the folders so they don't appear in the Taranis menus. Smart. I have to go do that.
I combined my .lua and .luac when it asked and I can now get all the setting when I long hold page
This shortcut doesn't work more, have you some solution to new version?
Question: I have Smart Audio controlling vtx...no issues. I installed lua scripts and it controls everything on the vtx EXCEPT PitMode. The equipment is working, so is there a special way to turn PitMode on/off? The screen says it is saving but the vtx never changes and the lua PitMode setting goes back to whatever it was set at? Telemetry is definitely working. Equipment: fireworks v2 flashed to 3.5.1 and BF 3.5, 9D+ radio with 2.2.3, eachine tx805. Any help is greatly appreciated.
Roger
Unify (and possibly other SmartAudio vTX) refuse to go back into pit mode after power up.
Try tinysleds real pit (search my channel for review)
After following this video, I am still getting a "Script Syntax Error" with "attempt to call field lock (a nil value)" when attempting to create a model to my Taranis 9xd plus. Help!!
I would re flash the radio including delete and replace the SD car contents.
People should wait for an increased lua ram version for opentx. stay at your current version of lua scripts to avoid frustration.
You dont need to fiddle with everything using your tx
Nice video, but 2 glitches:
- both .lua and .luac have been contained in the .zip package, therefore dragged&dropped onto the Taranis
- I tried deleting all the .lua's on the Taranis, only leaving the .luac's onboard. No more memory shortage warnings since!
Yeah I knew this will come soon! :D
When executing "Write Firmware to Radio" (5:00), to what path do you write the firmware? Do you write it directly to the "Taranis (J:)" drive?
None of the above. When you "write firmware to radio" you have the radio connected in DFU mode so there is no J drive. You plug in the taranis with power off and this causes it to enter DFU mode.
Maybe I am missing something, but the lua script linked in your OneDrive to move the vtx page doesn't reflect your change?
i cant seem to get my taranis detected on my PC when i connect it without using the ''hold buttons'' scenario. does it matter if i enter the sd card the 'old' way?
With OpenTX 2.2.1, you have to select USB Mass Storage or Game Controller from the model setup menu. Or you can have it prompt you each time you plug in
Mr Bardwell im fairly sure i have hit my head somewhere i cant get my head around lua scripts...can u do a video on lua script setup including troubleshooting problems.... i keep getting script syntax error with my kiss lua
If you get syntax error, then I would make sure the latest version of the script is downloaded and installed in the right folder.
Good morning, I have a yappu script from my PIXHAWK on x9d +, I would like to install the betaflight moon script and be able to use the 2 more I am not getting what I can do ???
I tried this and it bricked my radio. I suspect my folder structure was wrong or corrupted. To fix it I did 3 things. 1.) re-ran the ImpulseRC driver fixer 2.) re-unzipped the sdcard-taranis-x9-2.2V0013 file and put it on the SD card 3.) put the firmware .bin file on the SD card this time in the firmware folder and flashed it using the radio instead of OpenTX companion. It said my EEPROM wasn't right though, but it tried to fix itself and seems to be OK.
You should always be able to flash the radio in DFU mode, which you access by plugging in the radio with the radio powered down, then run the IRC Driver Fixer. But ultimately whatever works...
I'm just glad I got it back to working again. I was sweating it for a minute, and now I can run the lua scrips. Yeah!! Thank you Joshua.
I have the new lua and I'm on the qx7. I do not get the low memory warning or syntax error. Betaflight works everytime without that luac. I only get the low memory warning for the inav lua, and syntax error for lua pilot.
Go to your folder that has the x7 x9d, and horus labeled folders. Delete the folders that are not for your transmitter. Only delete the other transmitter named folders. Then the page shortcut works without memory error
I followed this video to the letter but when I go into the sd card on the my taranis x9d plus se and go into the BF file then select bf.luac then execute it I get this message "script syntax error /BF/bf.luac incompatabible precompiled chunk" Anyone have any ideas how to correct this please ?
hey Joshua, I need a little help with some trouble shooting, I followed you instructions in this video and now my Taranis Qx7 disconnects from receiver after just 1min
I don't know if it is the receiver(new build which I flashed with the Fport firmware) or the fact that I updated the firmware on my TX should I try reflashing my Tx or my RX or both??
Thanks
Hey Joshua, I just want to update my firmware from 2.2.0 to 2.2.2, do you have a video of this procedure?
Please look up my video showing how to upgrade opentx on the xlite radio. The process is the same.
So - Is it possible to create a script that you can execute with , let's say, - a switch, that will do the whole - menu, page, enter, enter, execute command sequence automatically to select and run the luac script which executes/launches the correct BF script?
EDIT: whoops - looks like its been dealt with already :)
If you delete the .lua files, long page press falls back to the .luac files
possible to make a update: Betaflight Lua Script Updated for OpenTX 2.3.x ? regard
Hi Joshua thx for the great contents... Believe With your knowledge I learn something every video!!! I have a question for you: I have a Taranis QX7, I just installed the lua scripts, but sometimes I made a change and save the page and it's says Saving and later Retrying, and It won't save... Do you know what could posible happens??? Also some times I look for the lua scripts pages and it won't show any data like the telemetry won't works, but in my others Pages (Not Lua Scripts) it's show me everything I want, VFAS, RSSI, ... Thx in advance!!! Greetings from Colombia!!!
It sounds like your telemetry is not reliable from receiver to FC. But I don't know what the fix might be. I have one quad that does this too. If I wanted to fix it, I would probably replace the receiver.
Joshua Bardwell thx for answer so fast!!! Do you recommend flashing again the firmware to the R-XSR rx??? Thx in advance again!!!
If you have the latest firmware then there isn't much point to flashing again. If you don't have the latest, then yeah I would expect the latest to help.
Joshua Bardwell Nope it's the latest one!!! Well in a near future I will change the RX then... Thx for all the help!!! I appreciate!!!
lifesaver as always!
Failed at the first hurdle. The impulse app does not fix the drivers or find the radio. Help!!
Install the STM32 driver from here: www.st.com/en/development-tools/stsw-stm32102.html
awesome thanks!