iNavFlight / OpenTX-Telemetry-Widget

INAV Lua Telemetry with support for EdgeTX
https://luatelemetry.readthedocs.io/en/latest/
GNU General Public License v3.0
156 stars 32 forks source link

How are the release luac's being compiled? #135

Closed csurf closed 5 months ago

csurf commented 5 months ago

@stronnag

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

stronnag commented 5 months ago

Use the supplied Makefile.

make dist
unzip -d /path/to/mounted/radio/sdcard dist/LuaTelemetry_v2.2.4.zip

This will build the compiler locally, then build and zip the widget files. Obviously you need a native compiler to do this; probably gcc or clang.

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).