Quote:
Originally Posted by jwakeman
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.