align improv chip and version reporting with upstream

* allows for easier support of other MCUs (p4, c6, etc)
* removes a second place where the version strings had to be maintained
* use the same codename "next step" for v14.8
This commit is contained in:
Frank
2026-01-15 10:56:29 +01:00
parent a1a7eb6007
commit 1bda6ba072
2 changed files with 14 additions and 17 deletions

View File

@@ -708,7 +708,7 @@ function populateInfo(i)
if (i.ver.includes("0.14.3-b")) vcn = "Fried Chicken";
if (i.ver.includes("14.5.")) vcn = "Small Step";
if (i.ver.includes("14.6.")) vcn = "New Light";
if (i.ver.includes("14.7.")) vcn = "Next Step";
if ((i.ver.includes("14.7."))||(i.ver.includes("14.8."))) vcn = "Next Step";
cn += `v${i.ver} &nbsp;<i>"${vcn}"</i><p>(WLEDMM ${i.rel}.bin)</p><p><em>build ${i.vid}</em></p><table>
${urows}

View File

@@ -194,25 +194,22 @@ void sendImprovIPRPCResult(ImprovRPCType type) {
}
void sendImprovInfoResponse() {
const char* bString =
char bString[32] = { '\0' };
#ifdef ESP8266
"esp8266"
#elif CONFIG_IDF_TARGET_ESP32C3
"esp32-c3"
#elif CONFIG_IDF_TARGET_ESP32S2
"esp32-s2"
#elif CONFIG_IDF_TARGET_ESP32S3
"esp32-s3"
strcpy(bString, "esp8266");
#else // ESP32
"esp32"
strncpy(bString, ESP.getChipModel(), 31);
#if CONFIG_IDF_TARGET_ESP32
bString[5] = '\0'; // disregard chip revision for classic ESP32
#else
bString[31] = '\0'; // just in case
#endif
strlwr(bString); // convert to lower case
#endif
;
//Use serverDescription if it has been changed from the default "WLED", else mDNS name
bool useMdnsName = (strcmp(serverDescription, "WLED") == 0 && strlen(cmDNS) > 0);
char vString[32] = { '\0' };
//snprintf_P(vString, sizeof(vString)-1, PSTR("0.14.1-b34.42/%i"),VERSION); // upstream baseline
snprintf_P(vString, sizeof(vString)-1, PSTR("14.7.1/%i"),VERSION); // WLEDMM version
sprintf_P(vString, PSTR("%s/%i"), versionString, VERSION);
const char *str[4] = {"WLED", vString, bString, useMdnsName ? cmDNS : serverDescription};
sendImprovRPCResult(ImprovRPCType::Request_Info, 4, str);