|
Syntax Error!
I'm getting a syntax error on this line:
int Distance_Function(float tilt_angle_rad)
{
if (tracking_initialized == 1)
{
distance_from_wall = (int)(3.162 / tan(tilt_angle_rad));
return(distance_from_wall);
}
}
I'm not really sure I declaired everything right, but can someone help me out? I added math.h and included it in the tracking.c(where this code is from).
float tilt_angle_rad;
tilt_angle_rad = (0.01745) * (((TILT_SERVO - 144) * 25)/50);
Distance_Function(tilt_angle_rad);
I also have that somewhere else in the code. And I declaired my function aswell. Help? Thanks in advance!
|