-
How exactly are you compiling the .luac files that you're publishing in the release package zip? The luac files in the release zip seem to run fine & are very stable, yet compiling the lua files for the exact same release version (either via simulator or on the radio) are very unstable and cause frequent crashes. Are you using the same exact lua source files to create the compiled luac's? I see that you also published the source code for the luac compiler in your repo. Are you using a stand-alone version of the compiler to create these luac files? If so, how? The reason I ask is because I'm trying to test some simple changes that I've made to your latest release version, 2.2.4, but the resulting binaries are very unstable and crash. Even just running your unmodified lua files cause multiple crashes, yet the published luac's work fine. FYI, this is for a taranis X9D+, and low memory is obviously an issue... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Use the supplied
This will build the compiler locally, then build and Note that (a) we do not build specifically for any radio, it's either a grey scale or colour radio and (b) the same grey scale code runs on all grey scale radios (and works perfectly on my RM Boxer, EdgeTX). |
Beta Was this translation helpful? Give feedback.
-
@stronnag ok thank you very much. I will try building that way. FYI, I'm trying to setup a mod/PR that adds an option to force-enable monochrome on radios such as the taranis. i've got the code working fine in simulator (solves the problem of poor greyscale performance on some taranis screens). I just need it to compile into stable binaries. |
Beta Was this translation helpful? Give feedback.
-
@stronnag I'm still not sure why, but this worked great. The stand-alone lua compiler obviously does a much better job than either the simulator or the on-device compiler. I wish I would have known sooner, instead of struggling for so long with the binaries generated in the simulator. FYI, the new option I added & which I mentioned above: #138 |
Beta Was this translation helpful? Give feedback.
-
Apropos the compiler, I think the reason is that the firmware is 32bit, the simulator is 64bit which means there are some type size issues in the simulator compared to the firmware. This is why the release notes always recommend to use the pre-compiled You might thing that Lua would be immune to this sort of behaviour, but it's a whole "can of worms", for example: EdgeTX/edgetx#2994 (comment) ; an issue that took a lot of effort by the ETX developers to sort out. |
Beta Was this translation helpful? Give feedback.
Use the supplied
Makefile
.This will build the compiler locally, then build and
zip
the widget files. Obviously you need a native compiler to do this; probablygcc
orclang
.Note that (a) we do not build specifically for any radio, it's either a grey scale or colour radio and (b) the same grey scale code runs on all grey scale radios (and works perfectly on my RM Boxer, EdgeTX).