Go to Post Pro-tip: Friends don't let friends play defense! (in qualifications) - Mr. Lim [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 01-02-2014, 17:46
tuXguy15's Avatar
tuXguy15 tuXguy15 is offline
Team Mentor
AKA: Devin Kolarac
FRC #2559 (Normality Zero)
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Harrisburg, PA
Posts: 127
tuXguy15 is an unknown quantity at this point
Drive is inverted!

This year we are using 4 talons to drive our robot. We have two of them hooked up per pwm using andymarks slpiced pwm cable. So in the robotdrive code we have two talons, the left and the right. We are using an xbox controller for tank drive but when we drive, everything is inverted. The motors are hooked up right but front on the xbox is back, back is forward, left is right and right is left. Can this be fixed in our code?
Attached Files
File Type: java IterativeTest.java (3.2 KB, 4 views)
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2014, 19:21
Dinoyan Dinoyan is offline
Registered User
no team
Team Role: Electrical
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 62
Dinoyan is an unknown quantity at this point
Re: Drive is inverted!

Instead of:
drive.tankDrive(joystick1.getRawAxis(2), joystick1.getRawAxis(5));

Try:
drive.tankDrive(-joystick1.getRawAxis(2), -joystick1.getRawAxis(5)); //Xbox

Putting a negative sign in front of joystick it will invert and now it should work fine.

Last edited by Dinoyan : 01-02-2014 at 19:24.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2014, 19:57
tuXguy15's Avatar
tuXguy15 tuXguy15 is offline
Team Mentor
AKA: Devin Kolarac
FRC #2559 (Normality Zero)
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Harrisburg, PA
Posts: 127
tuXguy15 is an unknown quantity at this point
Re: Drive is inverted!

Ok ill try that tomorrow morning whenever i can stop by my school
__________________
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 11:01.

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