From af29756943783169635f64c295dd41da8727e18d Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Fri, 9 Dec 2022 17:51:03 +0100 Subject: [PATCH] Prevent auto restart on cam framebuffer init error (#1522) * use correct log level * revert autorestart on camera framebuffer init error * . Co-authored-by: CaCO3 --- code/main/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/main/main.cpp b/code/main/main.cpp index acd7fd3a..1f30d435 100644 --- a/code/main/main.cpp +++ b/code/main/main.cpp @@ -255,7 +255,10 @@ extern "C" void app_main(void) camera_fb_t * fb = esp_camera_fb_get(); if (!fb) { LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Camera Framebuffer cannot be initialized!"); - initSucessful = false; + /* Easiest would be to simply restart here and try again, + how ever there seem to be systems where it fails at startup but still work corectly later. + Therefore we treat it still as successed! + //initSucessful = false; */ } else { esp_camera_fb_return(fb);