|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
TalonSRX invert?
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
|
|
#2
|
||||
|
||||
|
Re: TalonSRX invert?
I wouldn't recommend inverting the speed controllers. Just make sure your math takes into account the the fact that your right motors need to rotate in the opposite direction and invert the signal you're sending it.
LeftMotor.set(1) RightMotor.set(-1) |
|
#3
|
|||||
|
|||||
|
Re: TalonSRX invert?
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.
|
|
#4
|
||||
|
||||
|
Re: TalonSRX invert?
Quote:
Code:
driveSystem.SetInvertedMotor(kFrontRightMotor, true); Code:
driveSystem.SetInvertedMotor(rightFrontDriveTalon, true); |
|
#5
|
||||
|
||||
|
Re: TalonSRX invert?
Lowercase "s"? setInvertedMotor
|
|
#6
|
||||
|
||||
|
Re: TalonSRX invert?
I looked in the RobotDrive.h and it is a capital S, the error I get is that it isn't a Motor Type
|
|
#7
|
||||
|
||||
|
Re: TalonSRX invert?
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.
|
|
#8
|
||||
|
||||
|
Re: TalonSRX invert?
Quote:
Code:
driveSystem.SetInvertedMotor(RobotDrive::kFrontRightMotor, true); |
|
#9
|
||||
|
||||
|
Re: TalonSRX invert?
Thanks! It now works
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|