-
Notifications
You must be signed in to change notification settings - Fork 4
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
DEBUG() #4
Comments
Nice - but will Serial.println accept multiple arguments?
Like DEBUG(“Hi”, 12, “people”)
… On 21 Apr 2022, at 07:19, copych ***@***.***> wrote:
On the web I have found one smart tip, so suggest modifying sparkStructures.h with this:
#define DEBUG_ON // Comment this line out for a production build
#ifdef DEBUG_ON
#define DEBUG(...) Serial.println(__VA_ARGS__)
#else
#define DEBUG(...)
#endif
it can accept any number of args, like DEBUG(0x0170, HEX) , so there will be no more need to use print(). And globally (un-)defined DEBUG_ON could switch the entire project to clean production build.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
It only duplicates what println can do. But it accepts concatenation: DEBUG("Hi " + String(12) + " people"); |
Sometimes .print is needed, so I modified my local copy as following:
this'd keep compatibility with the existing code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the web I have found one smart tip, so suggest modifying sparkStructures.h with this:
it can accept any number of args, like DEBUG(0x0170, HEX) , so there will be no more need to use print(). And globally (un-)defined DEBUG_ON could switch the entire project to clean production build.
The text was updated successfully, but these errors were encountered: