groupgets / GetThermal

Cross-platform USB thermal camera viewer
MIT License
228 stars 90 forks source link

Update LEPTON_SDK.c #38

Open mellbratt opened 3 years ago

mellbratt commented 3 years ago

Had to make these small changes for it to compile on macOS Catalina 10.15.7 and Qt 5.15.2

kekiefer commented 3 years ago

Hi! Thanks for the PR.

I believe that this change is syntactically correct, but it appears like it will create an infinite recursion at runtime when the function calls itself.

The LEP_GetAttribute function still needs to call the "concrete" implementation of UVC_GetAttribute, defined in src/leptonvariation.cpp, which does the actual communication with the device.

If you provide the compile error message, I might be able to offer a bit more help.

mellbratt commented 3 years ago

Oops,

Yes I'm new at this. ;D Did as suggested in the error message below and it would then run. Didn't realise it would cause other problems...

EDIT: Tried to fix the line breaks in the error message for clarity

/Users/xxxxx/Downloads/GetThermal-master/lepton_sdk/Src/LEPTON_SDK.c:142: error: implicit declaration of function 'UVC_GetAttribute' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ../GetThermal-master/lepton_sdk/Src/LEPTON_SDK.c:142:18: error: implicit declaration of function 'UVC_GetAttribute' is invalid in C99 [-Werror,-Wimplicit-function-declaration] result = UVC_GetAttribute(portDescPtr, commandID, attributePtr, attributeWordLength); ^ ../GetThermal-master/lepton_sdk/Src/LEPTON_SDK.c:142:18: note: did you mean 'LEP_GetAttribute'? ../GetThermal-master/lepton_sdk/Src/LEPTON_SDK.c:102:12: note: 'LEP_GetAttribute' declared here LEP_RESULT LEP_GetAttribute(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr, ^