Go to Post ...regardless of anything that happens, there should be no booing at competitions, only cheers. True, many of us want to win, but in the end, all of us are working to expand FIRST and to promote the inspiration and recognition of science and technology through gracious professionalism. - Aignam [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 05-02-2015, 10:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: TalonSRX invert?

Quote:
Originally Posted by FRC2501 View Post
We program in C++ and I was wondering if there is a way to invert TalonSRXs in programming because out Omni drive needs both right motors to be inverted or it acts weird
I think you're looking for the setInvertedMotor() function. It works with any Robot Drive object regardless of what kind of speed controller you have on your drivebase.
  #2   Spotlight this post!  
Unread 05-02-2015, 16:29
FRC2501's Avatar
FRC2501 FRC2501 is offline
Registered User
FRC #2501 (Bionic Poalrs)
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Minnesota
Posts: 52
FRC2501 is an unknown quantity at this point
Re: TalonSRX invert?

Quote:
Originally Posted by Alan Anderson View Post
I think you're looking for the setInvertedMotor() function. It works with any Robot Drive object regardless of what kind of speed controller you have on your drivebase.
The SetInvertedMotor() function seems to be broken to me, it doesn't like either
Code:
driveSystem.SetInvertedMotor(kFrontRightMotor, true);
or
Code:
driveSystem.SetInvertedMotor(rightFrontDriveTalon, true);
  #3   Spotlight this post!  
Unread 05-02-2015, 16:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: TalonSRX invert?

Quote:
Originally Posted by FRC2501 View Post
The SetInvertedMotor() function seems to be broken to me, it doesn't like either
Code:
driveSystem.SetInvertedMotor(kFrontRightMotor, true);
or
Code:
driveSystem.SetInvertedMotor(rightFrontDriveTalon, true);
Lowercase "s"? setInvertedMotor
  #4   Spotlight this post!  
Unread 05-02-2015, 17:07
FRC2501's Avatar
FRC2501 FRC2501 is offline
Registered User
FRC #2501 (Bionic Poalrs)
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Minnesota
Posts: 52
FRC2501 is an unknown quantity at this point
Re: TalonSRX invert?

Quote:
Originally Posted by Ether View Post
Lowercase "s"? setInvertedMotor
I looked in the RobotDrive.h and it is a capital S, the error I get is that it isn't a Motor Type
  #5   Spotlight this post!  
Unread 05-02-2015, 17:25
baumgartensam's Avatar
baumgartensam baumgartensam is offline
Registered User
AKA: Sam Baumgarten
FRC #0751 (Barn2Robotics)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: United States
Posts: 42
baumgartensam will become famous soon enough
Re: TalonSRX invert?

Quote:
Originally Posted by FRC2501 View Post
I looked in the RobotDrive.h and it is a capital S, the error I get is that it isn't a Motor Type
A number of the method names are capitalized. It drives me crazy (pun intended) as the Java naming convention is a lowercased first letter and then the rest of the word is camel cased. The CANTalonSRX class has a few of these incorrectly named methods as well but it's a fairly minor issue in the scheme of things.
  #6   Spotlight this post!  
Unread 05-02-2015, 18:03
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: TalonSRX invert?

Quote:
Originally Posted by FRC2501 View Post
The SetInvertedMotor() function seems to be broken to me, it doesn't like either
Code:
driveSystem.SetInvertedMotor(kFrontRightMotor, true);
or
Code:
driveSystem.SetInvertedMotor(rightFrontDriveTalon, true);
Unless you have using statements, I believe you need to qualify the constant names:
Code:
driveSystem.SetInvertedMotor(RobotDrive::kFrontRightMotor, true);
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
  #7   Spotlight this post!  
Unread 05-02-2015, 18:26
FRC2501's Avatar
FRC2501 FRC2501 is offline
Registered User
FRC #2501 (Bionic Poalrs)
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Minnesota
Posts: 52
FRC2501 is an unknown quantity at this point
Re: TalonSRX invert?

Quote:
Originally Posted by RyanCahoon View Post
Unless you have using statements, I believe you need to qualify the constant names:
Code:
driveSystem.SetInvertedMotor(RobotDrive::kFrontRightMotor, true);
Thanks! It now works
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


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

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