Go to Post There are only 4 seasons of the year my friend, build season, competition season, post-season and pre-season. - Tom Schindler [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2015, 18:48
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Possible Joystick Error?

When I was creating an extension of Joystick, I noticed an interesting error. If the button is pressed and held, getRawButton() will return true initially, however it will soon switch to false after a seemingly random amount of time. Has anyone else experienced this?
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2015, 20:28
TFleig78's Avatar
TFleig78 TFleig78 is offline
Registered User
AKA: Tyler
FRC #0078 (Air Strike)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Rhode Island
Posts: 58
TFleig78 will become famous soon enoughTFleig78 will become famous soon enough
Re: Possible Joystick Error?

We've never had that issue. I've had programs that rely on someone holding a joystick button and using getRawButton() for minutes at a time without it ever returning false. How were you displaying the value?
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2015, 20:56
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: Possible Joystick Error?

Quote:
Originally Posted by TFleig78 View Post
We've never had that issue. I've had programs that rely on someone holding a joystick button and using getRawButton() for minutes at a time without it ever returning false. How were you displaying the value?
We were holding the button with print the value of getRawButton(). I'll try with another computer/usb port at our next meeting.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2015, 22:21
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Possible Joystick Error?

It's most likely a fault in the controller itself. I've never encountered a similar issue in my years of programming though this year I'm mainly wrapped up in driver controls (which has no buttons)
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2015, 22:22
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 238
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Possible Joystick Error?

It is always useful to share your code through pastebin or something initially so if it IS code, we can look at it right away
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #6   Spotlight this post!  
Unread 15-03-2015, 19:48
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 93
Crossle86 is an unknown quantity at this point
Re: Possible Joystick Error?

I'm looking a new situation (for us) where the getrawbutton call works as one would expect on the trigger but not on the other buttons. If the trigger is held, the getrawbutton call returns true as long as the button is held. When press and hold any other button on the JS, the getrawbutton call is returning true, false, true, false, true, false etc until the button is released. The alternating of the true/false value happens quickly about once a second. This seems incorrect but I am trying to confirm if this is a problem or a JS button behavior that I am unfamiliar with. This happens on all 3 JS we use. Now using a TI LaunchPad device to connect actual push buttons to the DS (launchpad looks to the code just like a joystick) the buttons work as expected, getrawbutton returns true as long as the button is held.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-03-2015, 10:23
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 434
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Possible Joystick Error?

Does your joystick have a rapid fire feature enabled?
Do all buttons behave as you described, or just some?
__________________
http://team2168.org
Reply With Quote
  #8   Spotlight this post!  
Unread 16-03-2015, 11:08
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 93
Crossle86 is an unknown quantity at this point
Re: Possible Joystick Error?

I don't know about rapid fire but that is a good idea. I will check that today. Trigger works normally or at least as I expected. Getrawbutton returns true when trigger held. All other buttons appear to toggle the return from Getrawbutton while button is held.
Reply With Quote
  #9   Spotlight this post!  
Unread 16-03-2015, 12:55
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Possible Joystick Error?

if you use some form of joystick diagnostic program on the driver station, does that also show the 1second true/false/true/false?
Reply With Quote
  #10   Spotlight this post!  
Unread 16-03-2015, 16:51
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 93
Crossle86 is an unknown quantity at this point
Re: Possible Joystick Error?

Update: This is not a joystick problem. It is a very subtle code bug which has been found and killed. Thanks to all who replied.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi