Go to Post This reminds me a lot of how millennials are regularly called out for simply being younger and having different perspectives. In the end it's the ones who are calling them out in unprofessional in ways that end up embarrassing themselves and looking uninformed. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 12-04-2010, 22:52
cvitullo's Avatar
cvitullo cvitullo is offline
God of souls
FRC #0830
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Ann Arbor
Posts: 2
cvitullo is an unknown quantity at this point
FRC Joystick throttle problems

My team is using the throttle on the Attack 3 joystick for our kicker speed control, but for some reason it's only returning -1, 0, or 1. Never anything else, despite being an analog input. Anyone else have this problem?
We're passing it to a Victor (also, does anyone know the values a victor takes in? I can't find them anywhere) after a bit of math to convert it.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-04-2010, 22:57
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: FRC Joystick throttle problems

I believe Victors work the same as jaguars, a value between -1 and 1. Are you looking at the output directly from the joystick? The problem could be in your conversion code
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #3   Spotlight this post!  
Unread 12-04-2010, 23:06
cvitullo's Avatar
cvitullo cvitullo is offline
God of souls
FRC #0830
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Ann Arbor
Posts: 2
cvitullo is an unknown quantity at this point
Re: FRC Joystick throttle problems

Do they now. My mentor was under the impression is was 0 - 255. That would explain some of our problems. Can you/anyone confirm that? I don't have any hardware to actually test on right now

By the way, we're switching from LabVIEW to C++ for nationals, so it's kind of... urgent that we figure all this out.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-04-2010, 23:09
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: FRC Joystick throttle problems

Both the Victor and Jaguar class implement the same MotorController interface which defines the use of the Set function, so I'd assume they take the same inputs (and I'm 100% sure it's -1 to 1 on jags)

The 0-255 confusion is probably from the IFI system. I've never used it personally, but apparantly that is how the pwms on that board were controlled (no floating point capabilities on IFI)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #5   Spotlight this post!  
Unread 13-04-2010, 02:14
Al3+'s Avatar
Al3+ Al3+ is offline
ARTist
AKA: Anthony
FRC #0840 (Aragon Robotics Team)
Team Role: Programmer
 
Join Date: Oct 2009
Rookie Year: 2008
Location: San Mateo, CA
Posts: 58
Al3+ is a jewel in the roughAl3+ is a jewel in the roughAl3+ is a jewel in the rough
Re: FRC Joystick throttle problems

Quote:
Originally Posted by Radical Pi View Post
Both the Victor and Jaguar class implement the same MotorController interface which defines the use of the Set function, so I'd assume they take the same inputs (and I'm 100% sure it's -1 to 1 on jags)
Confirmed. The Joystick::GetThrottle() function also returns a float from -1 to +1.

And yes, it used to be 0 to 255 on the IFI control system.

Refer to the help docs that come with WindRiver (I believe it's C:\WindRiver\docs\extensions\something). The return types and such are all in there.
__________________
cout << "Hello, robotics. Goodbye, world." << endl;

"The two-axis accelerometer provided in the kit of parts (shown in the picture below) is a two-axis accelerometer." - WPILib User's Guide
Reply With Quote
  #6   Spotlight this post!  
Unread 13-04-2010, 02:24
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: FRC Joystick throttle problems

Quote:
Originally Posted by cvitullo View Post
My team is using the throttle on the Attack 3 joystick for our kicker speed control, but for some reason it's only returning -1, 0, or 1. Never anything else, despite being an analog input. Anyone else have this problem?
We're passing it to a Victor (also, does anyone know the values a victor takes in? I can't find them anywhere) after a bit of math to convert it.
Sounds like you are storing the joystick axis data in an integer variable. Make sure you store it in a float or a double.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-04-2010, 20:46
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: FRC Joystick throttle problems

Quote:
Originally Posted by cvitullo View Post
My team is using the throttle on the Attack 3 joystick for our kicker speed control, but for some reason it's only returning -1, 0, or 1. Never anything else, despite being an analog input. Anyone else have this problem?
We're passing it to a Victor (also, does anyone know the values a victor takes in? I can't find them anywhere) after a bit of math to convert it.
TRY THIS:

Quote:
if (ThirdStick->GetRawButton(3))
{
{ Variable->Set( ( ( ThirdStick->GetThrottle() / 2 ) - 0.5 ) ) ; } ;
};
it works well with our ball magnet
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Joystick Throttle ctcw Java 2 15-12-2009 19:11
Help with programing saitekx36f joystick and throttle sonicx059 Programming 4 21-01-2008 20:30
Joystick problems Golfer241 Technical Discussion 3 14-02-2006 16:35
Joystick Problems anupalsingh Programming 0 23-02-2004 17:50
Joystick problems archiver 2001 3 24-06-2002 02:40


All times are GMT -5. The time now is 03:24.

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