Go to Post Do you know how, say, Native American cultures were kept? They had storytellers, sages, and the like. They passed on their legends and culture to the next generation. So will we. - EricH [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 16-02-2012, 13:31
KyleS KyleS is offline
Registered User
FRC #3016
 
Join Date: Feb 2012
Location: Houston, TX
Posts: 3
KyleS is an unknown quantity at this point
Inverse Motors?

First time working with the WPIlib, not exactly sure how to inverse the motors when using the simple Arcade drive. Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2012, 13:43
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Inverse Motors?

Use the RobotDrive::SetInvertedMotor(RobotDrive::MotorType , bool) function.

Something like:
Code:
//joystick - fill in usb port number
Joystick joy;
//declare jags - fill in ports in constructors
Jaguar left_front, left_rear, right_front, right_rear;
//declare RobotDrive object
RobotDrive drive(left_front, left_rear, right_front, right_rear);
//set motor inversion
drive.SetInvertedMotor(RobotDrive::kFrontLeftMotor, false);
drive.SetInvertedMotor(RobotDrive::kFrontRightMotor, true);
drive.SetInvertedMotor(RobotDrive::kRearLeftMotor, false);
drive.SetInvertedMotor(RobotDrive::kRearRightMotor, true);
//drive
while (true) {
   drive.ArcadeDrive(joy);
}

Last edited by rbmj : 16-02-2012 at 13:45.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2012, 13:54
KyleS KyleS is offline
Registered User
FRC #3016
 
Join Date: Feb 2012
Location: Houston, TX
Posts: 3
KyleS is an unknown quantity at this point
Post Re: Inverse Motors?

Exactly what I needed, thanks! Now all I need to do is figure out why the Axis Camera isn't working.
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 17: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