Skip to content

Commit

Permalink
Save 2.3K in HTTPClient debug mode by PSTR (#5387)
Browse files Browse the repository at this point in the history
Convert the HTTPClient debug macro to store strings in PROGMEM and
use the printf_P method to dump them.

Saves ~2.3KB heap when in debug mode.
  • Loading branch information
earlephilhower committed Nov 29, 2018
1 parent e7d3cf6 commit fcdffc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#ifdef DEBUG_ESP_HTTP_CLIENT
#ifdef DEBUG_ESP_PORT
#define DEBUG_HTTPCLIENT(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
#define DEBUG_HTTPCLIENT(fmt, ...) DEBUG_ESP_PORT.printf_P( (PGM_P)PSTR(fmt), ## __VA_ARGS__ )
#endif
#endif

Expand Down

0 comments on commit fcdffc5

Please sign in to comment.