Rockbox Development > Starting Development and Compiling

Starting a plugin automatically

(1/1)

mo-seph:
Hi all,

I've created a plugin which gives a particular mode of operation that I'm developing for a specific user. (It gives a subset of operation just using two buttons).

Is there any way to automatically run a plugin at startup, so that the player is always in this mode? If not, can anyone give me pointers on how to build this functionality into the core and enable it by default?

Thanks very much for any help!

Febs:
You may have better luck asking this question in our IRC channel:

http://www.rockbox.org/irc/

(I'm not suggesting this is not an appropriate place for the question as well, but many more Rockbox developers participate in IRC than the forums.)

bascule:
There is mention of an autostart functionality plugin on this page:
http://www.rockbox.org/twiki/bin/view/Main/PluginAlpineCDC
But no details, and I can't find a patch on Flyspray relating to this autostart.rock plugin :(

Llorean:
You don't need a flyspray patch. There's a #define to add to the appropriate config-blah.h for your player, I believe #define AUTOROCK, but I'm not sure, and then you name whatever plugin you want to run autostart.rock, though I don't know exactly where to put it.

At least, this is if I understand correctly.

mo-seph:
Thanks for the quick responses!

I've found in main.c:

--- Code: ---/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */

--- End code ---

which does what the comment says, but for some reason not for simulator builds; I've done a copy/paste into the simulator init(), and now it seems to work fine.

Just to be clear, I've also made a plugin in the normal plugin dir called autostart.c, which ends up in the correct place.

Nice one!

Navigation

[0] Message Index

Go to full version