View Single Post
  #2   Spotlight this post!  
Unread 06-02-2012, 17:19
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: RobotDrive::Drive() with CANJaguar

Quote:
Originally Posted by jwakeman View Post
I see that RobotDrive:rive(),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.
__________________
Reply With Quote