flyduino / kissfc-tx-lua-scripts

Kiss Lua configuration script for taranis
GNU General Public License v3.0
40 stars 14 forks source link

Memory Profiles Added #18

Open BigBangPro opened 7 years ago

BigBangPro commented 7 years ago

5x Memory slots for each Telemetry Page (excl. VTx), including Edit Page to adjust Memory Slot Names

awolf78 commented 7 years ago

Too bad the profiles were not implemented on the KISS FC. Now you can only use them on LUA.

BigBangPro commented 7 years ago

Differing from the other board profIles, these sertings all work independently of each other

awolf78 commented 7 years ago

Which is awesome and I am not trying to take the butter of your bread BigBangPro. If the profiles would be implemented on the KISS FC they would be available on GUI/WIFI/OSD etc. as well. If you use LUA and e.g. OSD at the same time and they both store their profiles locally, then they are not synchronized. Could be very confusing to users.

BigBangPro commented 7 years ago

Ha no butter. Love it. I can see your point on mutiple sources of data, could get tricky to manage for sure

BigBangPro commented 7 years ago

Further testing tonight on X9 radio with other scripts in the Telemetry Folder (one running in background) generates script panic - not enough memory error. I'm sure I just need to trim more code.....because if I use a 'minified' version of the same lua it works flawlessly

fedorcomander commented 7 years ago

Minified version will produce same amount of luac code... The saving here is LESS lua script to load for compilation. Looks like we are getting back to the border of not enough memory. May be profiles are only needed for certain pages?

BigBangPro commented 7 years ago

I have some thoughts on reducing / simplifying the local variables used and will keep testing. The way you have designed the "pages" i would not think this would impact memory as it unloads one then loads another.

fedorcomander commented 7 years ago

oh believe me it does reduce memory usage ;))))

BigBangPro commented 7 years ago

is this more related to the amount of "memory" used to store the page variables (including tables) - example of AllPages.Text[1 to 9].value. The script I use is pretty intensive of storing alot of data in memory for later usage when called for saving values and changing names etc. I have planned to alter this to read back into the saved files through io.open(f) to minimise this.

fedorcomander commented 7 years ago

I do store one page at a time. Also, i do garbage collection when you change pages. So far i never had any issues with memory anymore :) NONE! Its possible to have as many pages as you like, you saw TPA page was NOT fitting before. ;)

BigBangPro commented 7 years ago

Yeah, i like the garbage collection. Will look to incorporate that into dumping stored values when page saving not in use