mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
only show running partition which is boot on 1st install and then cycle between app0/app1
This commit is contained in:
@@ -1579,12 +1579,10 @@ void EMSESP::start() {
|
|||||||
esp8266React.begin();
|
esp8266React.begin();
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
LOG_INFO("Booting EMS-ESP version %s from %s/%s partition",
|
LOG_INFO("EMS-ESP version %s (%s partition)", EMSESP_APP_VERSION,
|
||||||
EMSESP_APP_VERSION,
|
|
||||||
esp_ota_get_boot_partition()->label,
|
|
||||||
esp_ota_get_running_partition()->label); // welcome message
|
esp_ota_get_running_partition()->label); // welcome message
|
||||||
#else
|
#else
|
||||||
LOG_INFO("Booting EMS-ESP version %s", EMSESP_APP_VERSION); // welcome message
|
LOG_INFO("EMS-ESP version %s", EMSESP_APP_VERSION); // welcome message
|
||||||
#endif
|
#endif
|
||||||
LOG_DEBUG("System is running in Debug mode");
|
LOG_DEBUG("System is running in Debug mode");
|
||||||
LOG_INFO("Last system reset reason Core0: %s, Core1: %s", system_.reset_reason(0).c_str(), system_.reset_reason(1).c_str());
|
LOG_INFO("Last system reset reason Core0: %s, Core1: %s", system_.reset_reason(0).c_str(), system_.reset_reason(1).c_str());
|
||||||
|
|||||||
@@ -337,6 +337,12 @@ void System::system_restart(const char * partitionname) {
|
|||||||
Shell::loop_all(); // flush log to output
|
Shell::loop_all(); // flush log to output
|
||||||
delay(1000); // wait 1 second
|
delay(1000); // wait 1 second
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
|
#else
|
||||||
|
if (partitionname != nullptr) {
|
||||||
|
LOG_INFO("Restarting EMS-ESP from %s partition", partitionname);
|
||||||
|
} else {
|
||||||
|
LOG_INFO("Restarting EMS-ESP...");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -999,7 +1005,7 @@ void System::show_system(uuid::console::Shell & shell) {
|
|||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
shell.printfln(" Platform: %s (%s)", EMSESP_PLATFORM, ESP.getChipModel());
|
shell.printfln(" Platform: %s (%s)", EMSESP_PLATFORM, ESP.getChipModel());
|
||||||
shell.printfln(" Model: %s", getBBQKeesGatewayDetails().c_str());
|
shell.printfln(" Model: %s", getBBQKeesGatewayDetails().c_str());
|
||||||
shell.printfln(" Partition boot/running: %s/%s", esp_ota_get_boot_partition()->label, esp_ota_get_running_partition()->label);
|
shell.printfln(" Partition: %s", esp_ota_get_running_partition()->label);
|
||||||
#endif
|
#endif
|
||||||
shell.printfln(" Language: %s", locale().c_str());
|
shell.printfln(" Language: %s", locale().c_str());
|
||||||
shell.printfln(" Board profile: %s", board_profile().c_str());
|
shell.printfln(" Board profile: %s", board_profile().c_str());
|
||||||
@@ -1451,8 +1457,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
|||||||
node["freeCaps"] = heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024; // includes heap and psram
|
node["freeCaps"] = heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024; // includes heap and psram
|
||||||
node["usedApp"] = EMSESP::system_.appUsed(); // kilobytes
|
node["usedApp"] = EMSESP::system_.appUsed(); // kilobytes
|
||||||
node["freeApp"] = EMSESP::system_.appFree(); // kilobytes
|
node["freeApp"] = EMSESP::system_.appFree(); // kilobytes
|
||||||
node["partitionBootRunning"] = std::string(esp_ota_get_boot_partition()->label) + "/"
|
node["partition"] = esp_ota_get_running_partition()->label; // active partition
|
||||||
+ esp_ota_get_running_partition()->label; // will sycle app0/app0 - app1/app1 after OTA. boot/factory is on first install.
|
|
||||||
#endif
|
#endif
|
||||||
node["resetReason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
node["resetReason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
|
|||||||
Reference in New Issue
Block a user