|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Reverse polarity of a victor at declaration?
So I searched but couldn't find this question answered anywhere else.
Is there a way to inverse the victor commands at declaration of the motor? By which I mean as the motors go on there's a possibility that a motor command of 1 makes it go backward when it comes to driving the robot. Am I stuck modifying the motorcommand during processing or is there an overloaded way during declaration to tell the robot that motor is backwards? |
|
#2
|
|||
|
|||
|
Re: Reverse polarity of a victor at declaration?
If your using the robotDrive yes theres a method for reversing the motors:
Code:
myRobot.SetInvertedMotor(myRobot.kRearLeftMotor, true); |
|
#3
|
|||
|
|||
|
Re: Reverse polarity of a victor at declaration?
Yea, I'm referring to an individual basis. Right now we're just doing Motor->Set(-MotorCommand) for the ones that are backwards. Just seems like there should be a more elegant solution.
|
|
#4
|
||||
|
||||
|
Re: Reverse polarity of a victor at declaration?
Quote:
When calling the SetSpeed(speed) of a motor, you can do SetSpeed(speed*ARM_MOTOR_INVERSE) where ARM_MOTOR_INVERSE is defined as either -1.0 or 1.0. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|