Hi,
I have written a lua script that displays the models GPS location and also writes the last valid location to a text file. This is so that the location can be read in the field in the case of a lost model and entered into a smart phone geolocator app. This is particularly valid for slope soaring where the slope can be vast and the bracken 6ft high. With no pen usually available the data will be lost if the TX is turned off or model changed . I know the data could be available in the log files but the lua does not easily allow reading from the end of a possibly large csv file.
I can display the gps data on a telemetry screen and save the gps location to a txt file. BUT as I am running the script as a telemtry script so that the txt file is continualy up dated. The problem is that the tx is spending so much time writing to the text file the response of the user tx interface is really slowed down and sluggish.
Is there anyway to get the script called less often?
telemetry lua script running to often
telemetry lua script running to often
Last edited by nicholgd on Fri Mar 29, 2019 4:48 pm, edited 1 time in total.
Geoff N
Re: tlua elm script running to often
No, but you can/should keep track of when your script was last executed or how many times it has and return without doing anything if it's too soon/often.
Re: telemetry lua script running to often
yes obvious when its pointed out to you. A check if the data has changed since last the last write and that say 1 to 2 seconds has also passed should help considerably.
Thanks for the help
Thanks for the help
Geoff N