Go to Post Question: How can you tell the difference between an engineer and a programmer? Answer: You ask them to count. Engineers start counting from 1. Programmers start counting from 0. - Ed Law [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 29-01-2012, 16:41
Twisted eric's Avatar
Twisted eric Twisted eric is offline
Registered User
FRC #0581
 
Join Date: Jan 2010
Location: San Jose
Posts: 54
Twisted eric is an unknown quantity at this point
Question reversing an axis on a joystick

nevermind

Last edited by Twisted eric : 29-01-2012 at 16:49.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2012, 16:48
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: reversing an axis on a joystick

Quote:
Originally Posted by Twisted eric View Post
My team is doing mechanum wheels and I don't know how to program them with two joysticks(or even one). and almost got it but for a normaly set.getY(); will set one side going backwards. Please help.
Just invert the values... when you go positive then change it to negative: -set.getY();
For when you go negative do: Math.abs(set.getY());
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 10:50.

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