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

Upon flight reset, "Attempt to call a nil value" error thrown #130

Closed dxs94 closed 9 months ago

dxs94 commented 9 months ago

TX16S // ETX 2.9.2 // widget 2.2.3 Edge Degree release // no other LUA script running

Widget works fine. When clicking jog wheel, select "Reset telemetry", then select "Reset flight" the widget crashes (all the time) with "Attempt to call a nil value". The crash happens only when "resetting flight", this does NOT happen when only resetting telemetry.

stronnag commented 9 months ago

Does it / did it happen in 2.8?

stronnag commented 9 months ago

(a) Does not happen here (b) This is new bug / mis-feature in EdgeTX 2.92 (quelle suprise!!!) > In prior version, it did not present the model menu, it presented the widget menu. (c) as I'm fed up with working around new breaking features in EdgeTX, please complain to them (quote this Issue if you like). (d) Don't press that option ...

dxs94 commented 9 months ago

Can't say. Went from OTX 2.3.15 straight to ETX 2.9.2, and updated the widget at the same time. Will try to reinstall but not many hopes...

stronnag commented 9 months ago

Don't bother. This is a new mis-feature in EdgeTX. No prior version did this.

dxs94 commented 9 months ago

Well I think I found the fix. For some reason upon flight reset the radio is trying to load this file "load_e.lua" which does not exist. I then made a copy of "load.lua" which I renamed "load_e.lua" and it worked: no more error at flight reset.

I then looked at previous 2.2.0 release and the file "load_e.lua" was indeed present. So maybe not an edgetx problem after all ;) Thanks for keeping this great widget going forward.

stronnag commented 9 months ago

Indeed, it should not try to load that obsolete file ...

stronnag commented 9 months ago

Fixed by 2.2.4. Most of the recent releases here are due to non-backwards compatible EdgeTX changes ... somewhat tiresome.