mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-27 12:50:39 +03:00
SD card basic R/W check + folder/file presence check (#2085)
* SD card basic RW check + folder structure check * Default LED blink repeat 2x * Abort booting when SD basic R/W check failed * SD R/W error+missing folder,file > load reduced UI
This commit is contained in:
@@ -215,7 +215,10 @@ esp_err_t hello_main_handler(httpd_req_t *req)
|
||||
|
||||
if (filetosend == "/sdcard/html/index.html") {
|
||||
if (isSetSystemStatusFlag(SYSTEM_STATUS_PSRAM_BAD) || // Initialization failed with crritical errors!
|
||||
isSetSystemStatusFlag(SYSTEM_STATUS_CAM_BAD)) {
|
||||
isSetSystemStatusFlag(SYSTEM_STATUS_CAM_BAD) ||
|
||||
isSetSystemStatusFlag(SYSTEM_STATUS_SDCARD_CHECK_BAD) ||
|
||||
isSetSystemStatusFlag(SYSTEM_STATUS_FOLDER_CHECK_BAD))
|
||||
{
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "We have a critical error, not serving main page!");
|
||||
|
||||
char buf[20];
|
||||
@@ -228,13 +231,13 @@ esp_err_t hello_main_handler(httpd_req_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
message += "<br>Please check <a href=\"https://jomjol.github.io/AI-on-the-edge-device-docs/Error-Codes\" target=_blank>jomjol.github.io/AI-on-the-edge-device-docs/Error-Codes</a> for more information!";
|
||||
message += "<br>Please check logs with log viewer and/or <a href=\"https://jomjol.github.io/AI-on-the-edge-device-docs/Error-Codes\" target=_blank>jomjol.github.io/AI-on-the-edge-device-docs/Error-Codes</a> for more information!";
|
||||
message += "<br><br><button onclick=\"window.location.href='/reboot';\">Reboot</button>";
|
||||
message += " <button onclick=\"window.open('/ota_page.html');\">OTA Update</button>";
|
||||
message += " <button onclick=\"window.open('/log.html');\">Log Viewer</button>";
|
||||
message += " <button onclick=\"window.open('/info.html');\">Show System Info</button>";
|
||||
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, message.c_str());
|
||||
return ESP_FAIL;
|
||||
httpd_resp_send(req, message.c_str(), message.length());
|
||||
return ESP_OK;
|
||||
}
|
||||
else if (isSetupModusActive()) {
|
||||
ESP_LOGD(TAG, "System is in setup mode --> index.html --> setup.html");
|
||||
|
||||
Reference in New Issue
Block a user