Skip to content

Reminder: rework all debug directives #5658

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

Closed
d-a-v opened this issue Jan 24, 2019 · 0 comments · Fixed by #5728
Closed

Reminder: rework all debug directives #5658

d-a-v opened this issue Jan 24, 2019 · 0 comments · Fixed by #5728
Assignees
Milestone

Comments

@d-a-v
Copy link
Collaborator

d-a-v commented Jan 24, 2019

The good way to display a debug message is:

#define DEBUG_HTTPCLIENT(fmt, ...) \
    DEBUG_ESP_PORT.printf_P((PGM_P)PSTR(fmt), ## __VA_ARGS__)

Every DEBUG_ directives should follow this model.

@d-a-v d-a-v added this to the 2.6.0 milestone Jan 24, 2019
@d-a-v d-a-v self-assigned this Jan 24, 2019
d-a-v added a commit to d-a-v/Arduino that referenced this issue Feb 6, 2019
All fmt strings in flash
fix esp8266#5658

This also allows to avoid warnings and easy mistakes with (no brace):
    if (something)
        DEBUGV("blah");
@d-a-v d-a-v mentioned this issue Feb 6, 2019
d-a-v added a commit that referenced this issue Mar 14, 2019
* fix DEBUG macros

All fmt strings in flash
fix #5658

This also allows to avoid warnings and easy mistakes with (no brace):
    if (something)
        DEBUGV("blah");

* use newlib unaligned-compatible printf for DEBUGV

* remove useless putprintf since ::printf already uses ets_putc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant