Skip to content

Debug macros replace direct calls to Arduino_DebugUtils #164

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Jul 9, 2020

Conversation

aentinger
Copy link
Contributor

@aentinger aentinger commented Jul 9, 2020

This allows to configure the level of debug output within the header file and saves space by turning off all those debug messages which are not currently required.

Disable a particular debug output is as easy as replacing

#ifndef DBG_ERROR
  #define DBG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
#endif

with

#ifndef DBG_ERROR
  #define DBG_ERROR(fmt, ...) //Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
#endif

@manchoz I think you'll love that one 😉

@aentinger aentinger self-assigned this Jul 9, 2020
@aentinger aentinger added the type: enhancement Proposed improvement label Jul 9, 2020
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jul 9, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2020

Codecov Report

Merging #164 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #164   +/-   ##
=======================================
  Coverage   95.61%   95.61%           
=======================================
  Files          29       29           
  Lines        1004     1004           
=======================================
  Hits          960      960           
  Misses         44       44           
Impacted Files Coverage Δ
src/utility/ota/OTALogic.cpp 98.03% <ø> (ø)
src/utility/ota/OTALogic.h 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a93b4e2...5a57fa0. Read the comment docs.

@aentinger aentinger changed the title Debug macros instead of direct calls to Arduino_DebugUtils Debug macros replace direct calls to Arduino_DebugUtils Jul 9, 2020
@aentinger aentinger merged commit 81c9a8b into master Jul 9, 2020
@aentinger aentinger deleted the debug-macros branch July 9, 2020 12:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants