MCPcopy Index your code
hub / github.com/crosspoint-reader/crosspoint-reader / checkPanic

Function checkPanic

lib/hal/HalSystem.cpp:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void checkPanic() {
91 if (isRebootFromPanic()) {
92 auto panicInfo = getPanicInfo(true);
93 auto file = Storage.open("/crash_report.txt", O_WRITE | O_CREAT | O_TRUNC);
94 if (file) {
95 file.write(panicInfo.c_str(), panicInfo.size());
96 file.close();
97 LOG_INF("SYS", "Dumped panic info to SD card");
98 } else {
99 LOG_ERR("SYS", "Failed to open crash_report.txt for writing");
100 }
101 }
102}
103
104void clearPanic() {
105 panicMessage[0] = '\0';

Callers 1

setupFunction · 0.85

Calls 6

isRebootFromPanicFunction · 0.85
getPanicInfoFunction · 0.85
openMethod · 0.45
writeMethod · 0.45
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected