-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The DEBUG build no longer compiles #80
Comments
Hello @benpeart ! Could you please tell me which example are you trying to compile? Thank you. |
I was using MPU6050_6Axis_MotionApps20.h but any example that tries to build with the DEBUG flag set will have this error. If you look the cause is trivial - someone commented out the line in MPU6050_9Axis_MotionApps41.cpp that declares the productID variable but forgot to comment out the DEBUG_PRINT line that uses it. I've submitted pull request #81 that fixes this with both a simple fix (comment out the line that tries to use productID) and a more robust fix that should prevent these types of errors in the future. |
Thank you @benpeart for the comments. Currently, the .ino examples do not have issues during compilation when DEBUG is defined, but you have a point regarding the productID definition. Is there another issue we can help you with? |
Hi @benpeart ! If there are no more questions or issues we can help you with right now, we will close the query. Please contact us again if necessary. |
If you attempt to compile with the DEBUG macro defined, the library does not compile with the error:
I have submitted a pull request that contains a two-part fix. The first part is to fix the compile error by commenting out the offending DEBUG_PRINT line. The second/better fix is to update the DEBUG_PRINT macros so that the structure of the macros ensures that the code is always validated at compile time but is not called when DEBUG is undefined. This will prevent stale debug code from accumulating when the debug version is not regularly compiled.
The text was updated successfully, but these errors were encountered: