Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - arzoo

Pages: [1]
1
That sounds more like an AM bug to me, have you reported it?

Good idea, I'll report the bug. In the mean time, I realize there's no need for the plugin to read the AM config file since LEDBlinky itself does that to get the control codes.

2
Read the file using squirrel standard library. May I ask what you are trying to do?

I'm updating the LEDBlinky plugin so it correctly passes events to LEDBlinky. If I can get this working I'll add AM as a front-end that's natively supported by LEDBlinky (I'm the dev). The last issue I'm having with the plugin is that when AM is configured to show the Displays menu on startup (startup_mode = displays_menu), the plugin receives two back-to-back Transition.ToNewList callbacks on startup, the first is for the selected item (display) in the list and the second is for the Displays menu itself. I don't want the plugin to pass the first (bogus) ToNewList transition to LEDBlinky. The only way I can see making this work is if the plugin knows how the startup_mode is set, which is why I need to read the value from the attract.cfg file. I was hoping the config values were stored in a table that was included in the fe object, but I guess I'll have to manually parse the file.

Can you point me to any docs or examples for using the squirrel standard library to read a file? Thanks!

3
Hi, Is it possible to get the values from the attrract.cfg file from within a plugin? Any suggestions would be appreciated. Thanks.

4
Scripting / Re: Persist variable between plugin instances? SOLVED
« on: May 14, 2020, 05:20:56 AM »
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?

5
Scripting / Re: Persist variable between plugin instances?
« on: May 13, 2020, 07:00:57 PM »
Ok, looks like I can use the fe.nv table to persist data. Problem solved.

6
Scripting / Re: Persist variable between plugin instances?
« on: May 13, 2020, 05:50:05 PM »
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?

7
Scripting / Re: Detect when the Displays list is active?
« on: May 13, 2020, 01:55:27 PM »
Thanks for the info, very helpful.

8
Scripting / Persist variable between plugin instances? SOLVED
« 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.
Code: [Select]
::ledblinky_started <- true;

9
Scripting / Detect when the Displays list is active? SOLVED
« on: May 13, 2020, 05:45:05 AM »
Can anyone tell me if it's possible for a plugin to detect when the Displays list is active vs when a list of games is active? Thanks

Pages: [1]