From 9097dff8f6088d7342d9d02e6c01f9367ffb679d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:06:47 +0100 Subject: [PATCH] show full chip revision in info shows "rev3.1" instead of "rev3" on V4 builds --- wled00/json.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wled00/json.cpp b/wled00/json.cpp index ec05773b..599a0a4a 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -1134,7 +1134,17 @@ void serializeInfo(JsonObject root) root[F("e32text")] = restartCode2Info(getRestartReason()); static char msgbuf[32]; +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 3) + // use the full revision if we can + esp_chip_info_t chip_info; + esp_chip_info(&chip_info); + snprintf(msgbuf, sizeof(msgbuf)-1, "%s rev%u.%u", + ESP.getChipModel(), + unsigned(chip_info.full_revision / 100), // full revision is in (major * 100 + minor) format + unsigned(chip_info.full_revision % 100)); +#else snprintf(msgbuf, sizeof(msgbuf)-1, "%s rev.%d", ESP.getChipModel(), ESP.getChipRevision()); +#endif root[F("e32model")] = msgbuf; root[F("e32cores")] = ESP.getChipCores(); root[F("e32speed")] = ESP.getCpuFreqMHz();