Go to Post So we get to hear the likes of Copioli, Baker and Patton yuk it up? This should be good. - Ricky Q. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2006, 18:19
The yellowdart's Avatar
The yellowdart The yellowdart is offline
Registered User
FRC #1506 (Metal Muscle)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Oakland County
Posts: 22
The yellowdart has a little shameless behaviour in the past
Inverting Joysticks?

The electrical guys and i have wired the robot and everything. All the wiring is pretty neat and tidy, but we have a problem.... we have 2 right handed transmissions and need to invert one of our joysticks.

I was just wondering what i would do in the code to invert the joysticks. Any and all help or ideas would be greatly appreciated.

**we dont wanna rewire anything, we would like to change the code
  #2   Spotlight this post!  
Unread 20-02-2006, 18:30
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,510
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Inverting Joysticks?

It is very easy to just swap the wires on the motor side of the victor. If you want to do it in the program, replace all your pwm values with
Code:
254-whateveryoucurrentlyhave
That should invert it.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #3   Spotlight this post!  
Unread 20-02-2006, 19:01
The yellowdart's Avatar
The yellowdart The yellowdart is offline
Registered User
FRC #1506 (Metal Muscle)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Oakland County
Posts: 22
The yellowdart has a little shameless behaviour in the past
Re: Inverting Joysticks?

we only need it switched for one joystick.....will doing 254 - whatever really invert, or is there a command to invert it?
  #4   Spotlight this post!  
Unread 20-02-2006, 19:24
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Inverting Joysticks?

joystickvar = 254 - joystickvar;


That's all you need.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #5   Spotlight this post!  
Unread 20-02-2006, 19:53
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Inverting Joysticks?

Quote:
Originally Posted by The yellowdart
we only need it switched for one joystick.....will doing 254 - whatever really invert, or is there a command to invert it?
Yes, it really inverts it. There is no command although you could right your own function.

Quote:
Originally Posted by sanddrag
It is very easy to just swap the wires on the motor side of the victor.
On one of our motors this is what our programmer chose to do. Just swap the red and black wires on the output. It's probably helpful to document that someplace in case the wires are ever disconnected and need to be reconnected in the correct place.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #6   Spotlight this post!  
Unread 20-02-2006, 20:05
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
Re: Inverting Joysticks?

Wow I didn't think of it being as easy as 254-p1_y.......

I came up with 127-(p1_y-127) which essentially does the same thing... I think to much...
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
Closed Thread


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
2004-2005 Joysticks kjohnson Control System 3 11-04-2005 23:39
Pressure sensative Joysticks Validius General Forum 1 15-03-2005 13:59
number of joysticks Waste General Forum 21 27-01-2005 15:04
Sophisticated Joysticks WebWader125 Control System 3 03-12-2004 15:33
AVB joysticks..and other analogue joysticks tml240 Kit & Additional Hardware 6 07-02-2004 12:45


All times are GMT -5. The time now is 01:36.

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