Author Topic: LUA Scripting on Taranis OpenTX  (Read 5444 times)

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
LUA Scripting on Taranis OpenTX
« on: 14/08/2014, 03:44:46 PM »
ChrisB, et al.

I've been developing a LUA Telemetry script for my Taranis and Quadcopter.

See the screenshot below...

Problem is that sometimes I add a couple of lines of code and I suddenly get a blank screen! Even when I know that the new code is OK.

The OpenTX LUA documentation mentions this:

Quote
Should not exceed maximum allowed runtime/ number of instructions.

Standard OpenTX mixes are run every XX milliseconds in a very deterministic way (guaranteed execution) while model scripts are run from another thread with less priority. Their execution period is around 30ms and is not guaranteed!

A script could be disabled/killed anytime due to several causes like (error in script, not enough free memory, etc...)

Trouble is that I can't find any mentions of actual values for maximum execution time or maximum memory usage!

Notice it say "...run every XX milliseconds..." - Not very clear!

Has anyone ever come across this issue?

BTW, I'm asking the same questions on the OpenTX Forum also...

Cheers!

Jim
« Last Edit: 14/08/2014, 03:48:45 PM by Jim Mchugh »
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)