Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   RobotDrive::Drive() with CANJaguar (http://www.chiefdelphi.com/forums/showthread.php?t=102106)

jwakeman 06-02-2012 16:47

RobotDrive::Drive() with CANJaguar
 
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.

mikets 06-02-2012 17:19

Re: RobotDrive::Drive() with CANJaguar
 
Quote:

Originally Posted by jwakeman (Post 1121108)
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

Re: RobotDrive::Drive() with CANJaguar
 
Yeah your right, not sure how I missed it. I should have slowed down a bit, I was on a thread starting terror yesterday.


All times are GMT -5. The time now is 17:39.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi