Multiple ctrldev drivers for the same device class

Hi ctrldev driver developers!

Those of you developing ctrldev drivers for zynthian will be happy to know that i just pushed to vangelis (testing branch) the multi-driver feature that allows choosing among a list of drivers for the same device.

Some tips:

  • You simply drop your driver in the zyngine/ctrldev folder and reload zynthian UI. You don’t need to edit the “init.py” that has been removed from this folder.

  • Remember that module name and class name have to be the same.

  • Only one driver from the list can be loaded for each device.

Regards,

3 Likes

Awesome, I just saw the commit.

Looks like we are invited (but not required) to add the Class properties driver_name and driver_description. Are these used in the UI?

Yes, they are in use in the UI, although i’ve not updated for using in the existing drivers … yet!

1 Like