Update main.cpp
This commit is contained in:
@@ -518,7 +518,7 @@ void logCoreDump()
|
|||||||
{
|
{
|
||||||
coredumpPrinted = false;
|
coredumpPrinted = false;
|
||||||
delay(500);
|
delay(500);
|
||||||
Serial.println("Printing coredump and saving to coredump.hex on SPIFFS");
|
Log->println("Printing coredump and saving to coredump.hex on SPIFFS");
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
size_t address = 0;
|
size_t address = 0;
|
||||||
if (esp_core_dump_image_get(&address, &size) == ESP_OK)
|
if (esp_core_dump_image_get(&address, &size) == ESP_OK)
|
||||||
@@ -528,6 +528,7 @@ void logCoreDump()
|
|||||||
|
|
||||||
if (pt != NULL)
|
if (pt != NULL)
|
||||||
{
|
{
|
||||||
|
File file;
|
||||||
uint8_t bf[256];
|
uint8_t bf[256];
|
||||||
char str_dst[640];
|
char str_dst[640];
|
||||||
int16_t toRead;
|
int16_t toRead;
|
||||||
@@ -536,8 +537,9 @@ void logCoreDump()
|
|||||||
{
|
{
|
||||||
Log->println("SPIFFS Mount Failed");
|
Log->println("SPIFFS Mount Failed");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
File file = SPIFFS.open("/coredump.hex", FILE_WRITE);
|
{
|
||||||
|
file = SPIFFS.open("/coredump.hex", FILE_WRITE);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
Log->println("Failed to open /coredump.hex for writing");
|
Log->println("Failed to open /coredump.hex for writing");
|
||||||
}
|
}
|
||||||
@@ -546,6 +548,7 @@ void logCoreDump()
|
|||||||
file.printf("%s\r\n", NUKI_HUB_HW);
|
file.printf("%s\r\n", NUKI_HUB_HW);
|
||||||
file.printf("%s\r\n", NUKI_HUB_BUILD);
|
file.printf("%s\r\n", NUKI_HUB_BUILD);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Serial.printf("%s\r\n", NUKI_HUB_HW);
|
Serial.printf("%s\r\n", NUKI_HUB_HW);
|
||||||
Serial.printf("%s\r\n", NUKI_HUB_BUILD);
|
Serial.printf("%s\r\n", NUKI_HUB_BUILD);
|
||||||
|
|||||||
Reference in New Issue
Block a user