Hallo,
I have a problem with fully freeing the linuxevent object. If I open an event device file, say /dev/input/event3 with linuxevent and then do not close the device correctly by either deleting the linuxevent object, or sending it a "close" message, I cannot claim the device again later.
This happens, if I close Pd with the Quit message or the window manager buttons. The only way to reclaim a device - a Contour ShuttleXpress - I found is by unplugging it, removing various kernel modules (hid, evdev) with rmmod and then plugging the device back in.
I suppose, that the linuxevent's linuxevent_free method isn't called, when Pd is closed. Could this be? Of course I can work around all this by properly closing the device descriptor by hand, but this won't help for example, when Pd crashed.
ciao
Upon a brief examination, nothing sticks out. I'll be working on this tomorrow, I'll let you know if I find anything. Are you sure that it only happens with Pd? Could it be happening with this device in other programs? Sounds like a cool device, what do you think of it so far?
.hc
On Saturday, Feb 14, 2004, at 08:56 America/New_York, Frank Barknecht wrote:
Hallo,
I have a problem with fully freeing the linuxevent object. If I open an event device file, say /dev/input/event3 with linuxevent and then do not close the device correctly by either deleting the linuxevent object, or sending it a "close" message, I cannot claim the device again later.
This happens, if I close Pd with the Quit message or the window manager buttons. The only way to reclaim a device - a Contour ShuttleXpress - I found is by unplugging it, removing various kernel modules (hid, evdev) with rmmod and then plugging the device back in.
I suppose, that the linuxevent's linuxevent_free method isn't called, when Pd is closed. Could this be? Of course I can work around all this by properly closing the device descriptor by hand, but this won't help for example, when Pd crashed.
ciao
Frank Barknecht _ ______footils.org__
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
________________________________________________________________________ ____
"If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it."
- Thomas Jefferson
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
Upon a brief examination, nothing sticks out. I'll be working on this tomorrow, I'll let you know if I find anything. Are you sure that it only happens with Pd? Could it be happening with this device in other programs? Sounds like a cool device, what do you think of it so far?
So far I only used it with an event reader example program from the Linux HID/Event Tutorial. What makes me wonder is, that if I close the dev correctly, nothing bad happens. Only if I close Pd without closing the device in linuxevent, it hangs. But I've found, that unplugging and plugging in the device will help as well, so no rmmod necessary.
The device itself has some disadvangages. For example, both wheels don't have a zero value! The outer ring goes from 1-7 and -1 to -7 but never reports 0 even when in the physical zero position. Positions other than 0 get repeated automatically, though, at about 1 Hz which is really too slow for anything useful. So I think, I will have to treat 1 and -1 the same and filter out the other values with [change]. I have no idea why Contour did this, it feels really stupid.
I still get one button acting as right mouse button. I cannot check right now, but IIRC the buttons are numbered from 260-264. The first button, 260, opens up the context menu when testing it with Pd, and does do even outside of Pd (WM root menu). I'm also not sure currently, if this only happens while Pd is running. If not, than it's my personal problm. ;)
Other than that the ShuttleXpress is a really cool device. It stands firm on the desk, the buttons are in good reach and you can even handle it with two hands, one doing the buttons, the other the wheels.
Button reports also work in combination, you you could use all binary combinations as values (which would be 32). The wheel goes from 1-255 (no zero as well) but need several turns for the whole range. After that it starts again at 1 rsp. 255 depending on your direction.
ciao