feat: added crash recorder and ability to save dump

This commit is contained in:
Yurii
2024-10-24 04:01:14 +03:00
parent 6c4f8a78a0
commit 3d11d13631
10 changed files with 338 additions and 67 deletions

View File

@@ -188,6 +188,22 @@ String getResetReason() {
return value;
}
template <class T>
void arr2str(String &str, T arr[], size_t length) {
char buffer[12];
for (size_t i = 0; i < length; i++) {
auto addr = arr[i];
if (!addr) {
continue;
}
sprintf(buffer, "0x%08X ", addr);
str.concat(buffer);
}
str.trim();
}
void networkSettingsToJson(const NetworkSettings& src, JsonVariant dst) {
dst["hostname"] = src.hostname;