View Single Post
  #12   Spotlight this post!  
Unread 05-02-2015, 12:08
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: [C++] Use CAN Talons in RobotDrive

Quote:
Originally Posted by ozrien View Post
This might help, I ran this code on my mec bot, with gyro and CANTalons. I use IterativeRobot (it's just my preference).

http://www.chiefdelphi.com/forums/sh...3&postcount=20
Thanks! I'll have to try this later. I did just get RobotDrive working by putting this before the drive function:
Code:
leftFront->SetControlMode(CANSpeedController::kPercentVbus);
leftBack->SetControlMode(CANSpeedController::kPercentVbus);
rightFront->SetControlMode(CANSpeedController::kPercentVbus);
rightBack->SetControlMode(CANSpeedController::kPercentVbus);
There are problems with this solution though. For example, I can't reverse the motors anymore (it doesn't drive as soon as I add SetInvertedMotor in). I have another idea though that I will try later.