View Single Post
  #1   Spotlight this post!  
Unread 12-01-2009, 18:21
mahmosh's Avatar
mahmosh mahmosh is offline
Registered User
FRC #1946
 
Join Date: Jan 2008
Location: israel
Posts: 125
mahmosh is an unknown quantity at this point
need help understanding c code in robotdrive

hey...
i have this code that i got from WPILib. its a part from robotdrive.cpp
Code:
 RobotDrive::RobotDrive(SpeedController *frontLeftMotor, SpeedController *rearLeftMotor,
						SpeedController *frontRightMotor, SpeedController *rearRightMotor,
						float sensitivity)
i just copied it and pasted here from notepad.

i want to understand what is float sensitivity?? what could i put on it?
and other question: can i replace speedcontroller *...... with a number of the pwm in the digital sidecar? i mean if i am using a victor and have a connection for pwm number 1 so could i write for example :
Code:
myrobot.robotdrive(1,2,3,4,float sensitivity)
and here are constructor maybe it could help:
Code:
* Constructor for RobotDrive with 4 motors specified as SpeedController objects.
 * Speed controller input version of RobotDrive (see previous comments).
 * @param rearLeftMotor The back left SpeedController object used to drive the robot.
 * @param frontLeftMotor The front left SpeedController object used to drive the robot
 * @param rearRightMotor The back right SpeedController object used to drive the robot.
 * @param frontRightMotor The front right SpeedController object used to drive the robot.
 * @param sensitivity Effectively sets the turning sensitivity (or turn radius for a given value)
help me rapidly please
Reply With Quote