View Full Version : RobotDrive::Drive() with CANJaguar
jwakeman
06-02-2012, 16:47
I see that RobotDrive::Drive(),RobotDrive::ArcadeDrive(), RobotDrive::TankDrive() are setup to work with the CANJaguar class. However, since the output from the RobotDrive class is always limited to -1.0 to 1.0 I think it will only work if the Jaguar is in percent vbus control mode. It looks like if the min and max output was able to be set for RobotDrive then it could be used with the other control modes. Can someone confirm my conclusions? I may submit an enhancement request on FIRSTForge.
I see that RobotDrive::Drive(),RobotDrive::ArcadeDrive(), RobotDrive::TankDrive() are setup to work with the CANJaguar class. However, since the output from the RobotDrive class is always limited to -1.0 to 1.0 I think it will only work if the Jaguar is in percent vbus control mode. It looks like if the min and max output was able to be set for RobotDrive then it could be used with the other control modes. Can someone confirm my conclusions? I may submit an enhancement request on FIRSTForge.
If I read the source code correctly, you can change the max output by calling RobotDrive::SetMaxOutput. So if you are running Speed mode, for example, with a 400 RPM as max output value, you can call it to set max output to 400 and SetLeftRightMotorOutputs will multiply the -1.0 to 1.0 range with maxOutput. So essential, you will be specifying a percentage of max output.
jwakeman
07-02-2012, 09:32
Yeah your right, not sure how I missed it. I should have slowed down a bit, I was on a thread starting terror yesterday.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.