From 28ee3895c3bc2d373cd3b4dc9aa108579a0a8f0f Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Wed, 28 Nov 2018 20:36:59 -0800 Subject: [PATCH] Save 2.3K in HTTPClient debug mode by PSTR 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. --- libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h index fb9cfa8736..d2768d85b4 100644 --- a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h +++ b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h @@ -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