Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: arzoo on May 13, 2020, 07:24:26 AM
-
I've noticed that the LEDBlinky plugin is reloaded each time the Displays list is active. Has anyone had success creating a global variable that persists between different plugins or the same plugin for each instance?
I've tried this code but it doesn't persist.
::ledblinky_started <- true;
-
As a follow-up to my question above, I created a simple plugin that does nothing except print to the console, and this confirms that the plugin is started twice when attract-mode first starts up, and then again each time the displays list is active? Why does am restart the plugin multiple times? It also appears that any global variables are also cleared each time the plugin restarts. This makes it impossible to maintain "state" within a plugin. Has anyone else noticed this issue?
-
Ok, looks like I can use the fe.nv table to persist data. Problem solved.
-
Just remember that there is no rules with fe.nv. It might be wise to store your date inside a table with plugin/layout/module name to avoid being written over.
-
Just remember that there is no rules with fe.nv. It might be wise to store your date inside a table with plugin/layout/module name to avoid being written over.
Will do, thanks. Btw, who do I contact about having the current LEDBlinky plugin in the repo replaced with my updated version?
-
Just remember that there is no rules with fe.nv. It might be wise to store your date inside a table with plugin/layout/module name to avoid being written over.
Will do, thanks. Btw, who do I contact about having the current LEDBlinky plugin in the repo replaced with my updated version?
I believe the other process is as such, correct me if I am wrong;
- fork repo
- create branch
- make commit
- request pull
Try it. Hopefully it works. I started a public fork due to lack of communication. It's fustrating that the one open source software I can contribute to, I can't. Hopefully it changes in the future.