Open fdm225 opened 1 week ago
just some additional info
the QR code calculation is based on "speedata's" open source coding from here: https://github.com/speedata/luaqrcode/blob/master/qrencode.lua
can confirm, QR code procurement in wakeup handler runs into "max instructions" error
this script is 2 years and needs some more tweaking then update QR calculation,. Due to lack of knowledge at this time, there are some "don't do this" implemented, unfortunately too much projects in parallel......
this is a more condensed script, focussing on the max instructions issue just calculating the QR code (in wakeup handler) in case SF was switched
regards
I fixed a couple of small issues but when I ran into the instruction limit. I attempted to move it into the wakeup function and am putting any additional fixes on hold until I see if there is a resolution. If the only fix is to rewrite the computation portion of the QR code I will probably let this go as I do not want to take the time to understand where to break the main computation code up.
dave
You have attached several scripts, I see one source and one widget. Is it possible that you attach the minimum to reproduce the issue?
... you can take my "main.zip"-widget "QR-Calc" from above (only one main.lua), it's a subset of fdm225's widget, my example does the QR calculation only as a "proof of concept" and triggers the failure in wakeup handler too
Calculation (and failure) is initiated by switching SF in Sim.
regards
Hi Devs, I tried to update issue 4103 but didn't see any official response and would like to try and get this resolved. I am fixing a script that generates a QR code from the last logged GPS location and it does a lot of processing when started, enough to trigger the Max instructions count reached message. I am doing the processing in the wakeup function on version 1.5.15; do I need to do anything to use the preemption that is discussed in issue 4103 or am I misunderstanding how it works? I assumed that when the instruction count was reached it would preempt the current running script and when wakeup is called again it would pickup from where it left off, is that correct? I have attached the modified script in the case that it is of use.
Ethos-ModelFinder.zip