[ESP32S2] Only show CPU0 reboot reason on single-core ESP32 S2

This commit is contained in:
Ton Huisman
2021-10-04 20:01:24 +02:00
parent 93d08d0425
commit 3a4ab985bc
+4 -2
View File
@@ -140,8 +140,10 @@ String getResetReasonString() {
#ifdef ESP32
String reason = F("CPU0: ");
reason += getResetReasonString(0);
reason += F(" CPU1: ");
reason += getResetReasonString(1);
if (getChipCores() > 1) { // Only report if we really have more than 1 core
reason += F(" CPU1: ");
reason += getResetReasonString(1);
}
return reason;
#else // ifdef ESP32
return ESP.getResetReason();