Skip to content
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

Add #ifdef BH1750_DEBUG guards around all serial print statements #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QuentinTorg
Copy link

There were already #ifdef macros wrapping some of the serial print statements in the library. This PR adds macros around the remaining Serial print statements.

The serial print statements can be very noisy. They are helpful when debugging the BH1750, but for some use cases this can be extremely overwhelming. This is particularly hard to deal with when using serial prints to debug other sensors without the BH1750 sensor connected

break;
#endif
// out of range input, safe to return early
return false;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is maybe out of place in this PR. I can move it if preferred.
This exits early in the case that nothing was sent over the bus. If nothing was sent then there is no need to check for an ACK or print another error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant