From 1bda6ba072ca25312be475d7a09a70c4c6997021 Mon Sep 17 00:00:00 2001
From: Frank <91616163+softhack007@users.noreply.github.com>
Date: Thu, 15 Jan 2026 10:56:29 +0100
Subject: [PATCH] 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
---
wled00/data/index.js | 2 +-
wled00/improv.cpp | 29 +++++++++++++----------------
2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/wled00/data/index.js b/wled00/data/index.js
index bb0f15b6..d1e367dd 100644
--- a/wled00/data/index.js
+++ b/wled00/data/index.js
@@ -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} "${vcn}"
(WLEDMM ${i.rel}.bin)
build ${i.vid}
${urows}
diff --git a/wled00/improv.cpp b/wled00/improv.cpp
index d5110ee1..7e5b3a4d 100644
--- a/wled00/improv.cpp
+++ b/wled00/improv.cpp
@@ -194,25 +194,22 @@ void sendImprovIPRPCResult(ImprovRPCType type) {
}
void sendImprovInfoResponse() {
- const char* bString =
- #ifdef ESP8266
- "esp8266"
- #elif CONFIG_IDF_TARGET_ESP32C3
- "esp32-c3"
- #elif CONFIG_IDF_TARGET_ESP32S2
- "esp32-s2"
- #elif CONFIG_IDF_TARGET_ESP32S3
- "esp32-s3"
- #else // ESP32
- "esp32"
- #endif
- ;
-
+ char bString[32] = { '\0' };
+ #ifdef ESP8266
+ strcpy(bString, "esp8266");
+ #else // 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);