betaflight / betaflight-tx-lua-scripts

Collection of scripts to configure Betaflight from your TX (currently only supported in OpenTx)
GNU General Public License v3.0
590 stars 142 forks source link

Bug report - Scripts don't seem to work on edgetx-x9d+ v2.9.2 #493

Closed mbainrot closed 9 months ago

mbainrot commented 9 months ago
  1. Describe your problem; When trying to load either of hte scripts, compilation fails with "Script syntax error: loadScript("COMPILE/scripts.lua ,"bt") error File not found

Looking at the error, is it possible that "bt" is meant to be "bf"?

  1. Include ways to reproduce the problem;

    • Load 2.9.2 w/ sd card contents for 2.9.2
  2. Provide as much information as possible about your hardware and software, including: Taranis X9D+ (pre 2019), edgetx-x9d+/v2.9.2

haslinghuis commented 9 months ago

Did you try https://github.com/betaflight/betaflight-tx-lua-scripts-nightlies/releases

mbainrot commented 9 months ago

pretty sure I did, but doing it again

Reading the docs my "stab in the dark" about the bt is just that, the bt is "binary or text' mode which is default for loadScript("blah") without file mode parameters so nevermind that :)

So doing it again and giving it a unique folder so 110% sure that I don't balls it up (I think I just recopied the release rather than the nightly, bad file management and sydlexia is a winning recipe) and definitely copied the **right files.

Now I am getting " Script syntax error loadScript("/SCRIPTS/BF/COMPILE/scripts.lu(truncated) File " Which is weird

It is an old SD card (the Taranis X9D+ is a picky SOAB when it comes to SD cards, at least last time I tried) should I try a different SD card to rule out that?

Or is there a way I can get it to spew verbose logs that don't get truncated by the tiny screen that the Taranis has?

klutvott123 commented 9 months ago

you should check if the scripts.lua file actually exists on your sd card, and if it does, check its content

mbainrot commented 9 months ago

it exists and sha1sum matches the source

Looking at the order of operations it seems to fail compiling at rx.lua, sha1sumed it and sums match

mbainrot commented 9 months ago

So suspecting some .luac shenanigans i nuked the /SCRIPTS/BF folder and replaced it with the BF folder from the nightly and its gone back to the original error.

I even tried nuking the scripts folder and re-creating the lot + a power cycle of the tx just to be certain and still no fish, same original error.

I am noticing when it chucks a fit, the scripts disappear from the menu and I have to reboot the radio, is that of any significance?

mbainrot commented 9 months ago

OK cooking up a fresh SD card fixed the problem, new firmware seems to handle newer SD cards better too