electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time

poster

Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
HID Problem: joystick button give alternating result
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Tue Jul 24, 2007 11:42 pm    Post subject: HID Problem: joystick button give alternating result Reply with quote  Mark this post and the followings unread

I've got some USB HID probem with some joystick
(some has no such problem)
It's this:

When pushing a button, or changing axis value,
instead of only BUTTON ON ..
or just axis value,
I've got the value alternating between UP and DOWN
or axis value and 0.0000

(like this:)

Code:
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000
joystick axis 0 : 0.000000
joystick axis 0 : -1.000000


Code:
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up
joystick button 8 down
joystick button 8 up


I don't think it's related to chuck.
because I've got some joystick working out without this problem.

Is it HID problem?
I'm on Linux (Ubuntu Feisty)
Or did anyone experience this also with joystick on some different settings or OSes?

Thank you, enjoy joysticks. Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Jul 25, 2007 9:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Hmmmmm, never seen that. My first bet would be that it might need calibration? A lack of calibration and perhaps a "deadzone" set too small might give random data spewing from the hid device but the range here (all the way to the extremes) seems a bit too large for that. It's also quite odd that it would affect both buttons and axis.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Jul 25, 2007 9:33 am    Post subject: Reply with quote  Mark this post and the followings unread

OW..... might it have something to do with a poll-rate that's set too high? The poll-rate is the speed at which the computer (or console) asks the joypad what it's doing. I imagine setting it too high could give something like this but I also have to admit I never had to adjust that manually and wouldn't know where to set it.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Wed Jul 25, 2007 10:35 am    Post subject: Reply with quote  Mark this post and the followings unread

I experience this kind of value shifting with only some hardware settings:

a PlayStation dance pad, connected with PS/2 <-> USB interface
a game joystick with 2 joys together in one USB link

but these works well:
Logitech USB joystick,
a PlayStation light gun, connected with PS/2 <-> USB interface

hmmm.. eh! I still haven't tried with more hardwares.
I'm gonna try now and report.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Jul 25, 2007 10:48 am    Post subject: Reply with quote  Mark this post and the followings unread

It might be best to report to Spencer, I think Spencer did the Hid stuff and he was a great help to me when I ran into trouble using two identical joypads, I had a fix in just hours after we identified the culprit.

Oh, and could you please talk about that lightgun? What kind of data can you get from it? Anything at all to do with what's being "shot"? That would be so exciting! Does this need any special kind of converter? I do have a EMS converter that's supposed to be able to convert a PS1 lightgun to PS2 format (I think PS2 lightguns use USB).

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Wed Jul 25, 2007 7:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

After reading about the lightgun technology,
I guess there has to be some flashing content on the screen the gun is aiming
(some content we don't see)

So all I've got from the lightgun as a joystick...
Is button up/down -_-"
bang bang.. click.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Jul 25, 2007 10:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ow. Yes. I read the Wikipedia entry on lightguns now. That's not going to work. Oh, well, it was a nice dream...
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Gasten



Joined: Oct 16, 2006
Posts: 7
Location: Sweden

PostPosted: Sun Jul 29, 2007 4:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey, what's the joystick's make and model? I've heard that the Xbox-controller maps all it's buttons to axis's that spew out ints/floats something.


Right.. I have to get one too!
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Jul 29, 2007 7:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Gasten;

I'm not sure about the Xbox models but in general that's not such a weird thing. Some modern joypads for consoles, for example the PS2 ones, use presure sensitive buttons. For example the PS2 uses this in racing games where you push X to accelerate and push it harder to accelerate faster.

PC games (let's lump in Mac and Linux there, it's not like the are less "personal" then Windows) don't tend to use that so normally those buttons shouldn't be mapped that way but for music it might well make sense.

I don't know why this "spewing" happens but I suspect that's where it might come from.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

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
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use