View Single Post
  #3   Spotlight this post!  
Unread 13-02-2007, 15:46
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: Where do I begin to get the robot to move using the camera?

Thanks. I'm getting an error report though
Code:
if(Get_Camera_State())
	{
		if((Get_Tracking_State() != SEARCHING) && (Find_Distance() > 20) && (I_Want_To_Search == 1)) //(errored line)
		{
			pwm01 = 150; //Desired Forward Velocity
			pwm02 = 150;
			Switch3_LED = 1;
		}
		else if((Get_Tracking_State() != SEARCHING) && (Find_Distance() <= 20)) //(errored line)
		{
			pwm01 = 127;
			pwm02 = 127;
			I_Want_To_Search = 0; //Stops calling Servo_Track().
			Switch3_LED = 0;
		}
		else
		{
			Switch3_LED = 0;
		}
	}
The Find_Distance() function is this:
Code:
unsigned int Find_Distance(void)
{
	return(targetRange[pwm07-67]);
}
The error I get is this:
Code:
C:\USFIRST\frc_camera_s_21\CAMERA CODE\user_routines.c:254:Warning [2058] call of function without prototype
C:\USFIRST\frc_camera_s_21\CAMERA CODE\user_routines.c:260:Warning [2058] call of function without prototype
On the lines that I commented "//(errored line)"

What's wrong?