![]() |
get_tracking_state()
I have a question about how to use get_tracking_state(). I have included the tracking.h header file in my code, and I call the function in a normal if statement like this: if (get_tracking_state() == CAMERA_ON_TARGET)
{ our code; } anyways no where in user_routines_fast.c have I defined get_tracking_state(), and the only reason it compiles most of he way is because its prototyped in tracking.h. So my question is how I do I define it, or is there a global variable I can use that will suit my need. The error I get at the end of the compile looks like this; MPLINK 3.90, Linker Copyright (c) 2004 Microchip Technology Inc. Error - could not find definition of symbol 'get_tracking_state' in file 'C:\Feb 3rd\frc_camera_21\user_routines_fast.o'. Errors : 1 thanks for any help!!! |
Re: get_tracking_state()
The function prototype is in tracking.h which you should #include at the beginning of any file which uses it. The function definition is in tracking.c which you should have added to your project at the same time tracking.h was added.
Did you actually add the files to your project using MPLAB, or did you just copy them to the directory with your code? |
Re: get_tracking_state()
hey I included the tracking.h and tracking.c is included in my project, but I get this error!
Code:
Clean: Deleting intermediary and output files. |
Re: get_tracking_state()
oh! I figured it out, apparently I added in extra space before my if statement like if (get_camera_state() == CAMERA_ON_TARGET), so I had to delete the space like this if(get_camera_state() == CAMERA_ON_TARGET). thanks for your help!
|
Re: get_tracking_state()
The name of the function is Get_Tracking_State(). Capitalization matters.
|
Re: get_tracking_state()
Quote:
If you fixed the case of your function call, that's what solved your problem. If you didn't (and left it lower case), I would really appreciate knowing that... always have to be on the lookout for the dumb quirks of the compiler. :rolleyes: |
| All times are GMT -5. The time now is 18:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi