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?