Skip to content

Commit fcdffc5

Browse files
Save 2.3K in HTTPClient debug mode by PSTR (#5387)
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.
1 parent e7d3cf6 commit fcdffc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#ifdef DEBUG_ESP_HTTP_CLIENT
3737
#ifdef DEBUG_ESP_PORT
38-
#define DEBUG_HTTPCLIENT(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
38+
#define DEBUG_HTTPCLIENT(fmt, ...) DEBUG_ESP_PORT.printf_P( (PGM_P)PSTR(fmt), ## __VA_ARGS__ )
3939
#endif
4040
#endif
4141

0 commit comments

Comments
 (0)