Skip to content

Commit 92c99f2

Browse files
committed
Merge branch 'master' into bstream2
2 parents a5658fe + 5d5200a commit 92c99f2

File tree

16 files changed

+354
-306
lines changed

16 files changed

+354
-306
lines changed

cores/esp8266/Esp-version.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,41 @@
2828
#define STRHELPER(x) #x
2929
#define STR(x) STRHELPER(x) // stringifier
3030

31-
static const char arduino_esp8266_git_ver [] PROGMEM = STR(ARDUINO_ESP8266_GIT_DESC);
31+
static const char arduino_esp8266_git_ver [] PROGMEM = "/Core:" STR(ARDUINO_ESP8266_GIT_DESC) "=";
32+
#if LWIP_VERSION_MAJOR > 1
33+
#if LWIP_IPV6
34+
static const char lwip_version [] PROGMEM = "/lwIP:IPv6+" LWIP_HASH_STR;
35+
#else
36+
static const char lwip_version [] PROGMEM = "/lwIP:" LWIP_HASH_STR;
37+
#endif
38+
#endif
3239
static const char bearssl_version [] PROGMEM = "/BearSSL:" STR(BEARSSL_GIT);
3340

34-
String EspClass::getFullVersion()
35-
{
36-
return String(F("SDK:")) + system_get_sdk_version()
37-
+ F("/Core:") + FPSTR(arduino_esp8266_git_ver)
38-
+ F("=") + String(esp8266::coreVersionNumeric())
41+
String EspClass::getFullVersion() {
42+
String s(F("SDK:"));
43+
s.reserve(127);
44+
45+
s += system_get_sdk_version();
46+
s += FPSTR(arduino_esp8266_git_ver);
47+
s += String(esp8266::coreVersionNumeric());
3948
#if LWIP_VERSION_MAJOR == 1
40-
+ F("/lwIP:") + String(LWIP_VERSION_MAJOR) + "." + String(LWIP_VERSION_MINOR) + "." + String(LWIP_VERSION_REVISION)
49+
s += F("/lwIP:");
50+
s += LWIP_VERSION_MAJOR;
51+
s += '.';
52+
s += LWIP_VERSION_MINOR;
53+
s += '.';
54+
s += LWIP_VERSION_REVISION;
4155
#if LWIP_VERSION_IS_DEVELOPMENT
42-
+ F("-dev")
56+
s += F("-dev");
4357
#endif
4458
#if LWIP_VERSION_IS_RC
45-
+ F("rc") + String(LWIP_VERSION_RC)
59+
s += F("rc");
60+
s += String(LWIP_VERSION_RC);
4661
#endif
4762
#else // LWIP_VERSION_MAJOR != 1
48-
+ F("/lwIP:")
49-
#if LWIP_IPV6
50-
+ F("IPv6+")
51-
#endif // LWIP_IPV6
52-
+ F(LWIP_HASH_STR)
63+
s += FPSTR(lwip_version);
5364
#endif // LWIP_VERSION_MAJOR != 1
54-
+ FPSTR(bearssl_version)
55-
;
65+
s += FPSTR(bearssl_version);
66+
67+
return s;
5668
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy