Go to Post I'm down with banning the Chicken Dance (and take the Macerena with you when you go)! - Koko Ed [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 23-03-2010, 08:41
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Inverting controls in Java

Code:
RobotDrive myDrive = new RobotDrive(1,2,3,4);

if( invertMyDrive == true )
{
 myDrive.setInvertedMotor(kFrontLeft, true);
 myDrive.setInvertedMotor(kFrontRight, true);
 myDrive.setInvertedMotor(kRearLeft, true);
 myDrive.setInvertedMotor(kRearRight, true);
}

myDrive.tankDrive(leftStick, rightStick);
The above snippet will reverse the forward/backward direction of your bot if the "invertMyDrive" variable (a boolean) is set.

It sounds like if your axes got switched, you only inverted half of the drive.
Reply With Quote
 


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
Problems Inverting Wheels? Must Be Drama NI LabVIEW 1 15-02-2010 17:41
**FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** Pjohn1959 Programming 37 31-08-2009 15:55
Inverting x-axis jkjohnson Control System 8 22-02-2007 02:24
Inverting Joysticks? The yellowdart Programming 5 20-02-2006 20:05
Inverting Y axis on joystick FormatteD_C Programming 7 24-02-2004 16:56


All times are GMT -5. The time now is 11:16.

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