 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
PKGINGO
Joined: 05 Feb 2007 Posts: 4
Digg It |
Posted: Mon Feb 05, 2007 9:22 pm Post subject: CWiid and udev |
|
|
Joy of joys... I had a bad.... thing happen to me when using Cwiid. I was testing the interface on my machine, and with just the wii remote on wminput, it worked fantastic, btw . However, my little brother tripped over the cord that held my bluetooth adapter... long story short... I no longer have mouse support in linux... I have no idea why, but I've given up hope and decided to reinstall. Figured before I did, I would check to see if:
A) Do you have any insight on to what may have caused this?
B) I've been studying the code you wrote and am researching how to send joystick signals to udev, but am coming up empty handed. Eventually, I want to use wminput as a type of joystick server that will actually map to joystick buttons that can be used in games and in cedega. Namely, I am trying to make a nice profile for Psychonauts. I could use key presses, but the main thing I want to do is use the nunchuck for precision movement which can only be accomplished by an x and y axis. If you can give me some leads on where to look to emulate a joystick input I would be more than happy to try to whip something up when I get my distribution up and running.
I have other ideas too (A pretty GUI for the xmodmap woes is on my list ), and I am sure I could do all of this in windows without any problems what so ever... if I had a bluetooth device that liked any of the bluetooth stacks, so I'm just running everything through linux and it seems to be working fine for the most part except for what I noted. Please get back to me when you can. |
|
| Back to top |
|
 |
abstrakraft
Joined: 27 Dec 2006 Posts: 107
Digg It |
Posted: Mon Feb 05, 2007 11:00 pm Post subject: |
|
|
Mouse problem: you got me...Assuming you've rebooted, udev maintains the /dev tree dynamically, so there shouldn't be any files left behind after a restart. Have you ruled out hardware damage?
joystick support is on the way - next version will feature more advanced and flexible configuration.
An Xmodmap GUI would be super-uber-cool. You have my support. _________________ "I seldom let practicality get in the way of my fascination with shiny things and blinky lights."
- some guy
http://abstrakraft.org/cwiid |
|
| Back to top |
|
 |
PKGINGO
Joined: 05 Feb 2007 Posts: 4
Digg It |
Posted: Wed Feb 07, 2007 5:57 am Post subject: |
|
|
naw, I dont think its hardware, works fine in windows, I just reinstalled linux... somehow udev got removed completely (WTH?!) I'm more willing to bet it was my faulty hard drive than anything.
Nice to hear it will have more advanced configuration, I was looking at your code for the accelerometer and nunchuck, will your configuration be able to handle those as well? I've got no problem contributing to this, in fact, I'd benefit to learn how unix handles the hardware device. If you could point me in the right direction, I'd like to try having udev output joystick events, just right now, I can't find any decent information on it.
Back on the GUI, I can start coding that after my bandwidth limit is replenished for the week, its really sad our university limits it so harshly. It will take me DAYS to redownload all the development stuff I had  |
|
| Back to top |
|
 |
abstrakraft
Joined: 27 Dec 2006 Posts: 107
Digg It |
Posted: Wed Feb 07, 2007 11:52 am Post subject: |
|
|
A point in the right direction would be the existing code - the uinput system already produces a joystick device in addition to the event device, wminput just lacks the configuration options to use it well.
Take a look at input-programming.txt in the the linux kernel source "Documentation" folder - that's for kernel-space drivers, but uinput (what wminput uses) is the same concept, just a different interface (file instead of function call). _________________ "I seldom let practicality get in the way of my fascination with shiny things and blinky lights."
- some guy
http://abstrakraft.org/cwiid |
|
| Back to top |
|
 |
PKGINGO
Joined: 05 Feb 2007 Posts: 4
Digg It |
Posted: Wed Feb 07, 2007 9:00 pm Post subject: |
|
|
| Thanks, I'll have a look at that when I get back, I was looking all over, but everything I saw kept referencing devfs... I'm so new to this unix thing... |
|
| Back to top |
|
 |
PKGINGO
Joined: 05 Feb 2007 Posts: 4
Digg It |
Posted: Thu Feb 08, 2007 5:46 am Post subject: quickmod |
|
|
Thanks so much Abstrakraft for your help, I still can't download a compiler or anything so I havent had a chance to test this out, but heres a quick mod that lets you read in data from the accelerometer (patched directly into main, plugin didn't like me when I tried it last), and assign a key when you flick the wiiremote on the X axis. Just replace the wminput/main.c and use that config file for the new variable. Again this is untested, but it SHOULD work... makes me wish I had the bandwidth to grab a simple compiler :-/.
edit: the url is http://ciprianispasta.com/pkgingo/wminput-mod.tar |
|
| Back to top |
|
 |
abstrakraft
Joined: 27 Dec 2006 Posts: 107
Digg It |
Posted: Fri Feb 09, 2007 4:56 am Post subject: |
|
|
well, wminput is being mostly rewritten, but you did give me the idea to give plugins the ability to trigger buttons.
Basically, plugins provide up to 6 named axes, and up to 16 named "buttons" (key-generating events), all of which are independently assignable through the conf files. Plugins have full access to the wiimote, so they can use nunchuk accelerations, IR, EEPROM, whatever (this may be the easiest vehicle for the eventual goal of gesture recognition). Nunchuk buttons have been added, as well as classic controller buttons and analog axes. The direction pads on the wiimote and classic controller function as digital axes as well as traditional buttons (not sure why you'd want to use both at the same time, but you can). Axes are invertible. This version will probably not be able to switch configurations on the fly, but I'm taking care to make it easy to add in a later version.
Syntax looks something like:
Wiimote.A = BTN_A
Wiimote.1 = KEY_PROG1
Wiimote.Dpad.X = ABS_X
Wiimote.Dpad.Y = -ABS_Y
Classic.Dpad.X = ABS_HAT0X
Classic.Dpad.Y = ABS_HAT1X
Plugin.Acc.Pitch = ABS_THROTTLE
Plugin.Acc.Roll = ABS_MISC
Clarification - this is the next version, not yet released (or finished) _________________ "I seldom let practicality get in the way of my fascination with shiny things and blinky lights."
- some guy
http://abstrakraft.org/cwiid |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|