monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
629 stars 145 forks source link

device monitor arbitrary paths #525

Closed okyeron closed 4 years ago

okyeron commented 6 years ago

I'm looking for some sort of enhancement to allow for 3d party tty devices* to be recognized by norns alongside regular monome devices.

device_monitor.c has the following

// watchers
// FIXME: these names / paths are really arbitrary.
static struct watch w[DEV_TYPE_COUNT] = {
    {
        .sub_name = "tty",
        .node_pattern = "/dev/ttyUSB*"
    },
//..etc

Thus it would be great if this watcher section would allow for multiple types of tty devices (for when I get around to releasing these diy projects for others to use).

catfact commented 6 years ago

at the moment, i guess it would work with just tty*. (since we are already checking for usb subsystem as noted in issue #527.) would that address your scenario?

otherwise, could replace fwatch with regex and use more sophisticated pattern matching.

if you want to use something thats not libmonome-compatible, it gets more involved of crouse.

okyeron commented 6 years ago

Did a quick test and changing to .node_pattern = "/dev/tty*" seems to work ok for my DIY grid (and also with a second teensy/monome device attached)