For my application I need to rewrite/modify the library code. and now I'm in a include dependency hell. To solve this I split the struct define and functions definitions. But that doesn't work very well. Is seems like that include the same file at multiple levels gives problems.
This part I don't understand is.
If I include the correct include file I still got the same errors:
#include "sw/modules/enc/src/32b/enc.h"
in the beginning of the function. I still got the error message:
Description Resource Path Location Type
#20 identifier "ENC_Handle" is undefined Servo_obj.h /Servodriver line 292 C/C++ Problem
#20 identifier "ENC_Obj" is undefined Servo_obj.h /Servodriver line 293 C/C++ Problem
(Yes, both objects are in enc.h)
So Why is this? The only thing I can think of is that _ENC_H_ is already defined only the includes information is lost?
Can Someone please explain.
Thanks!
Edit: Somehow #include "main_position.h" seems toxic . strange, very strange.