Show bbqkees model - #1815

This commit is contained in:
proddy
2024-07-10 12:53:18 +02:00
parent 6f0062be5c
commit 4f40a3d990
7 changed files with 36 additions and 9 deletions

View File

@@ -1616,6 +1616,8 @@ void EMSESP::start() {
if (!nvs_.begin("ems-esp", false, "nvs1")) { // try bigger nvs partition on 16M flash first
nvs_.begin("ems-esp", false, "nvs"); // fallback to small nvs
}
LOG_DEBUG("NVS device information: %s", system_.getBBQKeesGatewayDetails().c_str());
#ifndef EMSESP_STANDALONE
LOG_INFO("Starting EMS-ESP version %s from %s partition", EMSESP_APP_VERSION, esp_ota_get_running_partition()->label); // welcome message
#else
@@ -1630,6 +1632,8 @@ void EMSESP::start() {
system_.system_restart();
};
webSettingsService.begin(); // load EMS-ESP Application settings...
// do any system upgrades

View File

@@ -1750,4 +1750,18 @@ bool System::ntp_connected() {
return ntp_connected_;
}
String System::getBBQKeesGatewayDetails() {
#ifndef EMSESP_STANDALONE
if (!EMSESP::nvs_.isKey("mfg")) {
return "";
}
if (EMSESP::nvs_.getString("mfg") != "BBQKees") {
return "";
}
return "BBQKees Gateway Model " + EMSESP::nvs_.getString("model") + " v" + EMSESP::nvs_.getString("hwrevision") + "/" + EMSESP::nvs_.getString("batch");
#else
return "";
#endif
}
} // namespace emsesp

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.7.0-dev.24"
#define EMSESP_APP_VERSION "3.7.0-dev.25"

View File

@@ -136,6 +136,9 @@ void WebStatusService::ESPsystemStatus(AsyncWebServerRequest * request) {
root["has_loader"] = (buffer != 0xFFFFFFFFFFFFFFFF && running->size != partition->size);
}
}
root["model"] = EMSESP::system_.getBBQKeesGatewayDetails();
#endif
response->setLength();