Skip to content

Use the same DEBUG provisions as ESP8266WebServer #2279

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
wants to merge 1 commit into from

Conversation

dagwieers
Copy link

Since DEBUG is a generic flag used by other projects, and since DEBUG_OUTPUT was not defined in this case, I opted to set DEBUG_OUTPUT as part of this file (cfr. ESP8266WebServer) and changed the default DEBUG #ifdef to a more specific DEBUG_ESP_DNS_SERVER #ifdef, also cfr. ESP8266WebServer.

This ensure out project using WiFiManager does not fail to build with the error:

/home/dag/home-made/ADEM/arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/DNSServer/src/DNSServer.cpp: In member function 'void DNSServer::replyWithIP()':
/home/dag/home-made/ADEM/arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/DNSServer/src/DNSServer.cpp:148:5: error: 'DEBUG_OUTPUT' was not declared in this scope
     DEBUG_OUTPUT.print("DNS responds: ");
     ^

Since DEBUG is a generic flag used by other projects, and since DEBUG_OUTPUT was not defined in this case, I opted to set DEBUG_OUTPUT as part of this file (cfr. ESP8266WebServer) and changed the default DEBUG #ifdef to a more specific DEBUG_ESP_DNS_SERVER #ifdef, also cfr. ESP8266WebServer.

This ensure out project using WiFiManager does not fail to build with the error:
```
/home/dag/home-made/ADEM/arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/DNSServer/src/DNSServer.cpp: In member function 'void DNSServer::replyWithIP()':
/home/dag/home-made/ADEM/arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/DNSServer/src/DNSServer.cpp:148:5: error: 'DEBUG_OUTPUT' was not declared in this scope
     DEBUG_OUTPUT.print("DNS responds: ");
     ^
```
@codecov-io
Copy link

Current coverage is 27.76%

Merging #2279 into master will not change coverage

@@             master      #2279   diff @@
==========================================
  Files            20         20          
  Lines          3641       3641          
  Methods         334        334          
  Messages          0          0          
  Branches        675        675          
==========================================
  Hits           1011       1011          
  Misses         2452       2452          
  Partials        178        178          

Powered by Codecov. Last updated by 07f4d4c...fd23b65

@devyte
Copy link
Collaborator

devyte commented Nov 9, 2018

Closing in favor of #5329

@devyte devyte closed this Nov 9, 2018
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.

3 participants