Skip to content

Commit dae3932

Browse files
committed
store strings in progmem
1 parent 74aab7e commit dae3932

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

cores/esp8266/Esp.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,24 +557,29 @@ String EspClass::getSketchMD5()
557557
return result;
558558
}
559559

560+
static const char arduino_esp8266_git_ver [] PROGMEM = STR(ARDUINO_ESP8266_GIT_VER);
561+
#if LWIP_VERSION_MAJOR != 1
562+
static const char lwip2_version [] PROGMEM = "/lwIP:" STR(LWIP_VERSION_MAJOR) "." STR(LWIP_VERSION_MINOR) "." STR(LWIP_VERSION_REVISION);
563+
#endif
564+
560565
String EspClass::getFullVersion()
561566
{
562-
return String("Boot:") + system_get_boot_version()
563-
+ "/SDK:" + system_get_sdk_version()
564-
+ "/Core:" STR(ARDUINO_ESP8266_GIT_VER)
567+
return String(F("Boot:")) + system_get_boot_version()
568+
+ F("/SDK:") + system_get_sdk_version()
569+
+ F("/Core:") + FPSTR(arduino_esp8266_git_ver)
565570
#if LWIP_VERSION_MAJOR == 1
566-
+ "/lwIP:" + String(LWIP_VERSION_MAJOR) + "." + String(LWIP_VERSION_MINOR) + "." + String(LWIP_VERSION_REVISION)
571+
+ F("/lwIP:") + String(LWIP_VERSION_MAJOR) + "." + String(LWIP_VERSION_MINOR) + "." + String(LWIP_VERSION_REVISION)
567572
#else
568-
+ "/lwIP:" STR(LWIP_VERSION_MAJOR) + "." STR(LWIP_VERSION_MINOR) + "." + STR(LWIP_VERSION_REVISION)
573+
+ FPSTR(lwip2_version)
569574
#endif
570575
#if LWIP_VERSION_IS_DEVELOPMENT
571-
+ "-dev"
576+
+ F("-dev")
572577
#endif
573578
#if LWIP_VERSION_IS_RC
574-
+ "rc" + String(LWIP_VERSION_RC)
579+
+ F("rc") + String(LWIP_VERSION_RC)
575580
#endif
576581
#ifdef LWIP_HASH_STR
577-
+ "(" LWIP_HASH_STR ")"
582+
+ "(" + F(LWIP_HASH_STR) + ")"
578583
#endif
579584
;
580585
}

0 commit comments

Comments
 (0)